longvu-db commented on code in PR #57142:
URL: https://github.com/apache/spark/pull/57142#discussion_r3599455687


##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala:
##########
@@ -4155,6 +4155,104 @@ class DataSourceV2SQLSuiteV1Filter
     }
   }
 
+  test("Selective Overwrite: REPLACE WHERE with column list - maps source 
columns by position") {

Review Comment:
   Should we add some tests that involving writing data between REPLACE WHERE 
column list and other features? I.e. WITH SCHEMA EVOLUTION, write options, 
struct columns, 
https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/execution/ExecuteImmediateEndToEndSuite.scala,...



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -1154,6 +1154,8 @@ class Analyzer(
         // Thus, we need to look at the raw plan if `relation` is a temporary 
view.
         // unwrapRelationPlan also resolves V2TableReference nodes in temp 
view plans.
         unwrapRelationPlan(relation) match {
+          case v: View if i.replaceCriteriaOpt.exists(_.isReplaceWhere) =>

Review Comment:
   Let's put this context into a short comment, so the goal is to simply 
preserve the exception error class, although.
   
   Another good thing about this comment is to give context on the various 
places View is rejected, which is currently all over the place.



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