HeartSaVioR commented on a change in pull request #30521:
URL: https://github.com/apache/spark/pull/30521#discussion_r531826778



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/streaming/DataStreamWriter.scala
##########
@@ -304,46 +308,68 @@ final class DataStreamWriter[T] private[sql](ds: 
Dataset[T]) {
    * @since 3.1.0
    */
   @throws[TimeoutException]
-  def saveAsTable(tableName: String): StreamingQuery = {
-    this.source = SOURCE_NAME_TABLE
+  def table(tableName: String): StreamingQuery = {

Review comment:
       Probably this could be the another opportunity we can revisit #29767 - I 
think DataFrameWriter and DataStreamWriter is not same, and it's a bit odd to 
make DataStreamWriter fit to DataFrameWriter. The former has lots of methods 
and some methods trigger action. The latter only allowed (before #29767) 
`start` method to trigger action. #29767 broke this and let two methods trigger 
action. (My initial proposal kept `start` method to only trigger action, as you 
remember.)
   
   Once we revisit this I think we should revisit this as well. Thoughts?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to