-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-33659][SS] Document the current behavior for DataStreamWriter.toTable API #30885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -301,12 +301,24 @@ final class DataStreamWriter[T] private[sql](ds: Dataset[T]) { | |||||||||
| def start(): StreamingQuery = startInternal(None) | ||||||||||
|
|
||||||||||
| /** | ||||||||||
| * :: Experimental :: | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Per the comment spark/common/tags/src/main/java/org/apache/spark/annotation/Experimental.java Lines 28 to 31 in cc23581
:: Experimental :: is the tag for scaladoc.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both annotations (experimental and evolving) provide different semantics, right? Adding the different tag would give more confusion as it's not clear whether this is experimental vs evolving. You're getting it from Experimental, not Evolving. I'll reopen this.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make sense, let me delete this |
||||||||||
| * | ||||||||||
| * Starts the execution of the streaming query, which will continually output results to the given | ||||||||||
| * table as new data arrives. A new table will be created if the table not exists. The returned | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here it documented a new table will be created if not existing, but later it also documents "Please create a table manually before the execution". It looks confusing, I think. Could we rephrase them together and give a more concrete description about table creation?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we have two small paragraphs for v1 and v2 table separately? E.g.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 to @viirya suggestion. My request was to describe the impact of options (mostly partitionBy) for matrix of v1 vs v2 and existing vs non-existing. Separating the case of v1 vs v2 is more important, so the suggestion looks better.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the rephrase, done in c158775 |
||||||||||
| * [[StreamingQuery]] object can be used to interact with the stream. | ||||||||||
| * | ||||||||||
| * Note, if the table does not exist, both V1 and V2 tables will respect the partitioningColumns | ||||||||||
|
xuanyuanking marked this conversation as resolved.
Outdated
|
||||||||||
| * provided by `partitionBy`. However, when the table exists, only V1 table will pass the | ||||||||||
| * partitioning info to the sink, V2 table will ignore the provided partitioning info. | ||||||||||
| * | ||||||||||
| * Similar to the above issue of partitioning, the new table created by this API lacks | ||||||||||
| * functionality (e.g., customized properties, options, and serde info) on creating V2 tables. | ||||||||||
| * Please create a table manually before the execution to avoid creating a table with incomplete | ||||||||||
| * information. | ||||||||||
| * | ||||||||||
| * @since 3.1.0 | ||||||||||
| */ | ||||||||||
| @Evolving | ||||||||||
| @throws[TimeoutException] | ||||||||||
| def toTable(tableName: String): StreamingQuery = { | ||||||||||
| this.tableName = tableName | ||||||||||
|
|
||||||||||
Uh oh!
There was an error while loading. Please reload this page.