You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Ayush Saxena (Jira)" <ji...@apache.org> on 2024/02/04 21:27:00 UTC
[jira] [Commented] (HIVE-28055) Iceberg: Merge needs to specify target table alias when using table branch
[ https://issues.apache.org/jira/browse/HIVE-28055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17814126#comment-17814126 ]
Ayush Saxena commented on HIVE-28055:
-------------------------------------
I think this doesn't work {{merge_test.target.branch_branch1.id}} as expected, the DOT resolution isn't right I believe....
cc. [~zhangbutao]
> Iceberg: Merge needs to specify target table alias when using table branch
> --------------------------------------------------------------------------
>
> Key: HIVE-28055
> URL: https://issues.apache.org/jira/browse/HIVE-28055
> Project: Hive
> Issue Type: Bug
> Reporter: Ayush Saxena
> Priority: Major
>
> Merge needs to specify target table alias when using table branch. I can't seem to get it to work without using a table alias. This could be user error or maybe this should be documented.
> For example:
> {code:java}
> create database merge_test;
> use merge_test;
> create table target (id int, value string) stored by iceberg stored as parquet tblproperties ('parquet.compression'='SNAPPY', 'format-version'='2');
> create table source (id int, value string) stored by iceberg stored as parquet tblproperties ('parquet.compression'='SNAPPY', 'format-version'='2');
> insert into target values (1, 'val1');
> insert into source values (1, 'val1');
> alter table target create branch branch1;
> alter table source create branch branch1;
> {code}
>
> But this doesn't work:
> {code:java}
> merge into merge_test.target.branch_branch1 using merge_test.source.branch_branch1 s on merge_test.target.branch_branch1.id = s.id when matched then update set value = 'matched';
> merge into merge_test.target.branch_branch1 using merge_test.source.branch_branch1 s on branch_branch1.id = s.id when matched then update set value = 'matched';{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)