[
https://issues.apache.org/jira/browse/HIVE-26102?focusedWorklogId=752926&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-752926
]
ASF GitHub Bot logged work on HIVE-26102:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Apr/22 14:38
Start Date: 05/Apr/22 14:38
Worklog Time Spent: 10m
Work Description: marton-bod commented on code in PR #3131:
URL: https://github.com/apache/hive/pull/3131#discussion_r842866645
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java:
##########
@@ -261,6 +268,13 @@ public boolean nextKeyValue() throws IOException {
while (true) {
if (currentIterator.hasNext()) {
current = currentIterator.next();
+ Configuration conf = context.getConfiguration();
+ if (HiveIcebergStorageHandler.isDelete(conf,
conf.get(Catalogs.NAME))) {
+ if (current instanceof GenericRecord) {
+ PositionDeleteInfo pdi =
IcebergAcidUtil.parsePositionDeleteInfoFromRecord((GenericRecord) current);
Review Comment:
> Do we need a GenericRecord here?
We need to have a GenericRecord here because it's straightforward to grab
the positional delete info for each record from the GenericRecord. I haven't
looked into how to grab it from a VectorizedRowBatch (or its parquet
equivalent), but seemed more complicated at first glance. As for whether we
need the instanceof check, that's a different question, I guess we don't, since
we already assert that vectorization is off during compilation, so I can remove
that extra check
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java:
##########
@@ -261,6 +268,13 @@ public boolean nextKeyValue() throws IOException {
while (true) {
if (currentIterator.hasNext()) {
current = currentIterator.next();
+ Configuration conf = context.getConfiguration();
+ if (HiveIcebergStorageHandler.isDelete(conf,
conf.get(Catalogs.NAME))) {
+ if (current instanceof GenericRecord) {
+ PositionDeleteInfo pdi =
IcebergAcidUtil.parsePositionDeleteInfoFromRecord((GenericRecord) current);
Review Comment:
> Do we need a GenericRecord here?
We need to have a GenericRecord here because it's straightforward to grab
the positional delete info for each record from the GenericRecord. I haven't
looked into how to grab it from a VectorizedRowBatch (or its parquet
equivalent), but seemed more complicated at first glance. As for whether we
need the instanceof check, that's a different question, I guess we don't, since
we already assert that vectorization is off during compilation, so I can remove
that extra check
Issue Time Tracking
-------------------
Worklog Id: (was: 752926)
Time Spent: 4h 10m (was: 4h)
> Implement DELETE statements for Iceberg tables
> ----------------------------------------------
>
> Key: HIVE-26102
> URL: https://issues.apache.org/jira/browse/HIVE-26102
> Project: Hive
> Issue Type: New Feature
> Reporter: Marton Bod
> Assignee: Marton Bod
> Priority: Major
> Labels: pull-request-available
> Time Spent: 4h 10m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)