Skip to content

Commit 1e0facb

Browse files
cloud-fandongjoon-hyun
authored andcommitted
[SQL][DOC][MINOR] update documents for Table and WriteBuilder
## What changes were proposed in this pull request? Update the docs to reflect the changes made by apache#24129 ## How was this patch tested? N/A Closes apache#24658 from cloud-fan/comment. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 20fb01b commit 1e0facb

File tree

2 files changed

+8
-2
lines changed
  • sql
    • catalyst/src/main/java/org/apache/spark/sql/sources/v2
    • core/src/main/java/org/apache/spark/sql/sources/v2/writer

2 files changed

+8
-2
lines changed

sql/catalyst/src/main/java/org/apache/spark/sql/sources/v2/Table.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
* implementation can be a directory on the file system, a topic of Kafka, or a table in the
3131
* catalog, etc.
3232
* <p>
33-
* This interface can mixin the following interfaces to support different operations, like
34-
* {@code SupportsRead}.
33+
* This interface can mixin {@code SupportsRead} and {@code SupportsWrite} to provide data reading
34+
* and writing ability.
3535
* <p>
3636
* The default implementation of {@link #partitioning()} returns an empty array of partitions, and
3737
* the default implementation of {@link #properties()} returns an empty map. These should be

sql/core/src/main/java/org/apache/spark/sql/sources/v2/writer/WriteBuilder.java

+6
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ default BatchWrite buildForBatch() {
7070
" does not support batch write");
7171
}
7272

73+
/**
74+
* Returns a {@link StreamingWrite} to write data to streaming source. By default this method
75+
* throws exception, data sources must overwrite this method to provide an implementation, if the
76+
* {@link Table} that creates this write returns {@link TableCapability#STREAMING_WRITE} support
77+
* in its {@link Table#capabilities()}.
78+
*/
7379
default StreamingWrite buildForStreaming() {
7480
throw new UnsupportedOperationException(getClass().getName() +
7581
" does not support streaming write");

0 commit comments

Comments
 (0)