aokolnychyi commented on code in PR #41028:
URL: https://github.com/apache/spark/pull/41028#discussion_r1183777434


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/RewriteRowLevelCommand.scala:
##########
@@ -117,8 +118,26 @@ trait RewriteRowLevelCommand extends Rule[LogicalPlan] {
       plan: LogicalPlan,
       attrs: Seq[Attribute]): ProjectingInternalRow = {
 
-    val colOrdinals = attrs.map(attr => plan.output.indexWhere(_.exprId == 
attr.exprId))
+    val colOrdinals = attrs.map(attr => findColOrdinal(plan, attr.name))
     val schema = StructType.fromAttributes(attrs)
     ProjectingInternalRow(schema, colOrdinals)
   }
+
+  // if there are assignment to row ID attributes, original values are 
projected as special columns
+  // this method honors such special columns if present
+  private def newLazyRowIdProjection(

Review Comment:
   Postgres, for instance, allows updates to primary keys.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to