You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "nsivabalan (via GitHub)" <gi...@apache.org> on 2026/06/25 03:12:55 UTC
Re: [I] Support predicates with target table fields in matched conditions in Spark SQL MERGE INTO [hudi]
nsivabalan commented on issue #15827:
URL: https://github.com/apache/hudi/issues/15827#issuecomment-4795483398
Triage update: this appears to be **fixed in current master**.
- `MergeIntoHoodieTableCommand` binds matched-clause conditions against the joined output of source + target (`joinedExpectedOutput`, see `hudi-spark-datasource/hudi-spark3-common/src/main/scala/org/apache/spark/sql/hudi/command/MergeIntoHoodieTableCommand.scala`, lines ~743–748). Target-table column references in `WHEN MATCHED AND ...` resolve through standard Spark analysis.
- An existing test, *Test MergeInto with more than once update actions* (`hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/dml/others/TestMergeIntoTable.scala`, lines 206–235), uses `when matched and source.data > target.data then update set target.data = source.data, target.ts = source.ts` and verifies the result, which is the same pattern as in this issue.
- Relevant relaxations of MERGE INTO restrictions: HUDI-4861, HUDI-6500, HUDI-6662 (commit 80d5b27).
If you can still reproduce the `cannot resolve` error on a recent build (1.0.x or master), please attach the exact DDL + MERGE statement and the Spark/Hudi versions; otherwise this can likely be closed.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org