cloud-fan commented on code in PR #58244:
URL: https://github.com/apache/spark/pull/58244#discussion_r3844751935
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -1894,7 +1895,8 @@ class Analyzer(
case o => o
}
- val resolvedMergeCondition =
resolveExpressionByPlanChildren(m.mergeCondition, m)
+ val resolvedMergeCondition =
+ resolveExpressionByPlanChildren(m.mergeCondition, m,
includeLastResort = true)
Review Comment:
**Non-blocking:**
`WHEN NOT MATCHED` conditions need the same last-resort resolution. The
`InsertAction` and `InsertStarAction` branches at lines 1852 and 1860 still
call `resolveExpressionByPlanOutput` without `includeLastResort = true`, so a
declared variable remains unresolved even though the other MERGE condition
forms now work. Please update both branches and add a focused `WHEN NOT MATCHED
AND <variable>` test.
--
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]