You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/23 04:20:01 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #29830: [SPARK-32960][SQL] Provide better exception on temporary view against DataFrameWriterV2

cloud-fan commented on a change in pull request #29830:
URL: https://github.com/apache/spark/pull/29830#discussion_r492564752



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriterV2.scala
##########
@@ -153,6 +153,7 @@ final class DataFrameWriterV2[T] private[sql](table: String, ds: Dataset[T])
    */
   @throws(classOf[NoSuchTableException])
   def append(): Unit = {
+    assertNoTempView("append")
     val append = loadTable(catalog, identifier) match {

Review comment:
       I'm thinking of a more aggressive refactor, which creates an unresolved logical plan here and leaves the table/temp view lookup to the analyzer.
   
   For example, here we can just create `AppendData.byName(UnresolvedRelation(...))`.
   
   By doing this, we can make the framework more clear: the API layer should just create logical plans, other works should be done by the analyzer and query planner.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org