[
https://issues.apache.org/jira/browse/HUDI-8457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17910376#comment-17910376
]
Y Ethan Guo edited comment on HUDI-8457 at 1/6/25 7:30 PM:
-----------------------------------------------------------
We should mention the constraints of MATCHED conditions as a limitation of
MERGE INTO in Hudi Spark SQL, for now. We should triage how much work it takes
to actually support such matching condition.
was (Author: JIRAUSER280684):
We should mention the constraints of MATCHED conditions as a limitation of
MERGE INTO in Hudi Spark SQL.
> Hudi MIT doesn't support the target table reference in extra MATCHED condition
> ------------------------------------------------------------------------------
>
> Key: HUDI-8457
> URL: https://issues.apache.org/jira/browse/HUDI-8457
> Project: Apache Hudi
> Issue Type: Sub-task
> Components: spark-sql
> Reporter: Aditya Goenka
> Priority: Blocker
> Fix For: 1.0.1
>
>
> Below MIT query fails with Hudi -
> ```{{{{}}{}}}
> {{MERGE INTO hudi_table_mor_2_partition_columns t
> USING comprehensive_merge_source s
> ON t.id = s.id
> WHEN MATCHED
> AND s.operation = 'UPDATE_DEPT_MATCH'
> AND t.department = s.department
> THEN
> UPDATE SET *
> WHEN MATCHED
> AND s.operation = 'UPDATE_SALARY' THEN
> UPDATE SET * ;}}
> {{```}}
> {{{}if we just remove `{}}}{{{}t.department = s.department{}}}{{{}` from
> above query it works. It also works if we just remove reference for target
> table from the same. {}}}{{{}`{}}}{{{}t.department = 'A'{}}}{{{}` doesn't
> work but {}}}{{{}`s{}}}{{{}.department = 'A'{}}}{{{}` works well.{}}}
>
> GIthub issue have reproducible code -
> [https://github.com/apache/hudi/issues/12180]
> Confirmed that DELTA supports these kind of MIT queries but Hudi fails with
> the Exception. Also checked with master code and issue still exists.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)