This is an automated email from the ASF dual-hosted git repository. dongjoon pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new 1e0facb [SQL][DOC][MINOR] update documents for Table and WriteBuilder 1e0facb is described below commit 1e0facb60d25015aa32328d8ca4769a0042b1637 Author: Wenchen Fan <wenc...@databricks.com> AuthorDate: Tue May 21 09:29:06 2019 -0700 [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 https://github.com/apache/spark/pull/24129 ## How was this patch tested? N/A Closes #24658 from cloud-fan/comment. Authored-by: Wenchen Fan <wenc...@databricks.com> Signed-off-by: Dongjoon Hyun <dh...@apple.com> --- .../src/main/java/org/apache/spark/sql/sources/v2/Table.java | 4 ++-- .../java/org/apache/spark/sql/sources/v2/writer/WriteBuilder.java | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sql/catalyst/src/main/java/org/apache/spark/sql/sources/v2/Table.java b/sql/catalyst/src/main/java/org/apache/spark/sql/sources/v2/Table.java index 482d3c2..21e1e8c 100644 --- a/sql/catalyst/src/main/java/org/apache/spark/sql/sources/v2/Table.java +++ b/sql/catalyst/src/main/java/org/apache/spark/sql/sources/v2/Table.java @@ -30,8 +30,8 @@ import java.util.Set; * implementation can be a directory on the file system, a topic of Kafka, or a table in the * catalog, etc. * <p> - * This interface can mixin the following interfaces to support different operations, like - * {@code SupportsRead}. + * This interface can mixin {@code SupportsRead} and {@code SupportsWrite} to provide data reading + * and writing ability. * <p> * The default implementation of {@link #partitioning()} returns an empty array of partitions, and * the default implementation of {@link #properties()} returns an empty map. These should be diff --git a/sql/core/src/main/java/org/apache/spark/sql/sources/v2/writer/WriteBuilder.java b/sql/core/src/main/java/org/apache/spark/sql/sources/v2/writer/WriteBuilder.java index aab46b0..d88b4a4 100644 --- a/sql/core/src/main/java/org/apache/spark/sql/sources/v2/writer/WriteBuilder.java +++ b/sql/core/src/main/java/org/apache/spark/sql/sources/v2/writer/WriteBuilder.java @@ -70,6 +70,12 @@ public interface WriteBuilder { " does not support batch write"); } + /** + * Returns a {@link StreamingWrite} to write data to streaming source. By default this method + * throws exception, data sources must overwrite this method to provide an implementation, if the + * {@link Table} that creates this write returns {@link TableCapability#STREAMING_WRITE} support + * in its {@link Table#capabilities()}. + */ default StreamingWrite buildForStreaming() { throw new UnsupportedOperationException(getClass().getName() + " does not support streaming write"); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org