Sagar Sumit created HUDI-6662:
---------------------------------
Summary: Merge Into fails if there is an extra data column in the
join expression
Key: HUDI-6662
URL: https://issues.apache.org/jira/browse/HUDI-6662
Project: Apache Hudi
Issue Type: Task
Reporter: Sagar Sumit
Fix For: 0.14.0
{code:java}
|create table $tableName (
| id int,
| name string,
| price double,
| ts long
|) using hudi
| location '${tmp.getCanonicalPath}'
| tblproperties (
| primaryKey ='id',
| preCombineField = 'ts'
| )
-- insert 2 records --
insert into $tableName values(1, 'a1', 10, 1000);
insert into $tableName values(2, 'a2', 11, 1000)
-- merge into --
| merge into $tableName as t0
| using (
| select 1 as id, 'a1' as name, 12 as price, 1003 as ts
| ) s0
| on t0.id = s0.id and t0.name = s0.name
| when matched then update set *
| WHEN NOT MATCHED THEN INSERT *{code}
This will throw the followin error with the latest master, while the previous
versions worked
{code:java}
org.apache.spark.sql.AnalysisException: Only simple conditions of the form
`t.id = s.id` using primary key or partition path columns are allowed on tables
with primary key. (illegal column(s) used: `partition`
at
org.apache.spark.sql.hudi.command.MergeIntoHoodieTableCommand.recordKeyAttributeToConditionExpression$lzycompute(MergeIntoHoodieTableCommand.scala:183)
at
org.apache.spark.sql.hudi.command.MergeIntoHoodieTableCommand.recordKeyAttributeToConditionExpression(MergeIntoHoodieTableCommand.scala:130)
at
org.apache.spark.sql.hudi.command.MergeIntoHoodieTableCommand.projectedJoinedDataset(MergeIntoHoodieTableCommand.scala:355)
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)