AbinayaJayaprakasam commented on code in PR #53251:
URL: https://github.com/apache/spark/pull/53251#discussion_r2609938948


##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -6029,6 +6029,12 @@
     ],
     "sqlState" : "428EK"
   },
+  "TEMP_VIEW_WRITE_NOT_ALLOWED" : {
+    "message" : [
+      "Cannot write into temp view <quoted> as it's not a data source v2 
relation."

Review Comment:
   Hi @cloud-fan .. Thanks a lot for reviewing this
   
   No, there is no V1 version of this error.
   
   Per my understanding the V1 API (DataFrameWriter.saveAsTable()) behaves 
differently: it allows writing when a temp view with the same name exists. 
   
   
https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala#L923-L933
   
   The error being renamed in this PR is specific to the V2 API 
(DataFrameWriterV2.writeTo()), which has stricter requirements: it only works 
with DataSource V2 relations, and temp views don't qualify.



-- 
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.

To unsubscribe, e-mail: [email protected]

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