200947912 opened a new issue, #3436:
URL: https://github.com/apache/amoro/issues/3436
### What happened?
When using the MergeInto statement, if you execute the filter method after
obtaining the references attribute from the Expression object, the Attribute
attribute you get will be the column names in the on clause, and you won't be
able to correctly obtain the specific columns in the alias table.
Here is an example:
merge into target t using (select * from source) source s
on t.id=s.id
when matched then update set a.col = b.col
when not matched then insert *;
In this way, I will get an UnsupportedOperationException. Exception message
is "The condition {'a.id, 'b.id} is not allowed because it is not a primary
key."
In
org.apache.amoro.spark.sql.catalyst.analysis.ResolveMergeIntoMixedFormatTableReferences#checkConditionIsPrimaryKey
if using **cond.references** then i'll get 'a.id with 'b.id,not id#1 or id#2.
### Affects Versions
0.7.1
### What table formats are you seeing the problem on?
_No response_
### What engines are you seeing the problem on?
_No response_
### How to reproduce
_No response_
### Relevant log output
```shell
```
### Anything else
_No response_
### Are you willing to submit a PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
--
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]