[
https://issues.apache.org/jira/browse/HIVE-26385?focusedWorklogId=792678&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-792678
]
ASF GitHub Bot logged work on HIVE-26385:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Jul/22 13:14
Start Date: 19/Jul/22 13:14
Worklog Time Spent: 10m
Work Description: kasakrisz commented on code in PR #3430:
URL: https://github.com/apache/hive/pull/3430#discussion_r924487111
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/MergeSemanticAnalyzer.java:
##########
@@ -297,15 +309,16 @@ private boolean handleCardinalityViolation(StringBuilder
rewrittenQueryStr, ASTN
//this is a tmp table and thus Session scoped and acid requires SQL
statement to be serial in a
// given session, i.e. the name can be fixed across all invocations
String tableName = "merge_tmp_table";
+ List<String> sortKeys = columnAppender.getSortKeys();
Review Comment:
We discussed with @lcspinter that his patch does independent changes.
I also applied both his and this patch to the same branch locally and wrote
a test case for updating sorted table. It works only for non vectorized mode.
The reason why it does not work in vectorized mode is not related to this
patch. It depends on the setting of `iceberg.mr.in.memory.data.model`
It is set to `HIVE` when vectorization is enabled:
https://github.com/apache/hive/blob/855c0642342f83a80f30ecf41f1f7f08048d6f80/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergInputFormat.java#L158
Delete delta files are not read with this setting.
Issue Time Tracking
-------------------
Worklog Id: (was: 792678)
Time Spent: 1h (was: 50m)
> Iceberg integration: Implement merge into iceberg table
> -------------------------------------------------------
>
> Key: HIVE-26385
> URL: https://issues.apache.org/jira/browse/HIVE-26385
> Project: Hive
> Issue Type: Improvement
> Components: File Formats
> Reporter: Krisztian Kasa
> Assignee: Krisztian Kasa
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.0.0
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> {code}
> create external table target_ice(a int, b string, c int) partitioned by spec
> (bucket(16, a), truncate(3, b)) stored by iceberg stored as orc tblproperties
> ('format-version'='2');
> create table source(a int, b string, c int);
> ...
> merge into target_ice as t using source src ON t.a = src.a
> when matched and t.a > 100 THEN DELETE
> when matched then update set b = 'Merged', c = t.c + 10
> when not matched then insert values (src.a, src.b, src.c);
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)