YannByron commented on a change in pull request #3700:
URL: https://github.com/apache/hudi/pull/3700#discussion_r738053730
##########
File path:
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/MergeIntoHoodieTableCommand.scala
##########
@@ -101,11 +103,11 @@ case class MergeIntoHoodieTableCommand(mergeInto:
MergeIntoTable) extends Runnab
val target2Source = conditions.map(_.asInstanceOf[EqualTo])
.map {
case EqualTo(left: AttributeReference, right)
- if targetAttrs.indexOf(left) >= 0 => // left is the target field
- left.name -> right
+ if targetAttrs.exists(f => attributeEqual(f, left, resolver)) => //
left is the target field
+ targetAttrs.find(f => resolver(f.name, left.name)).get.name -> right
Review comment:
It would be better to indent two more spaces~
--
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]