[
https://issues.apache.org/jira/browse/HIVE-29098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vikram Ahuja updated HIVE-29098:
--------------------------------
Description:
Steps to reproduce:
# drop table tbl_parquet;
# create external table tbl_parquet(a int) partitioned by (b string) stored as
parquet;
# insert into table tbl_parquet partition (b='one') values (1);
# insert into table tbl_parquet values (2,'');
In Hive Engine:
1. select * from tbl_parquet;
Result:
||a||b||
|2|__HIVE_DEFAULT_PARTITION__|
|1|one|
2. alter table tbl_parquet convert to iceberg;
3. select * from tbl_parquet;
Result:
||a||b||
|1|one|
In Spark Engine:
1. select * from tbl_parquet;
Result:
||a||b||
|2|NULL|
|1|one|
2. CALL spark_catalog.system.migrate('default.tbl_parquet');
3. select * from tbl_parquet;
Result:
||a||b||
|2|NULL|
|1|one|
was:
Steps to reproduce:
drop table tbl_parquet;
create external table tbl_parquet(a int) partitioned by (b string) stored as
parquet;
insert into table tbl_parquet partition (b='one') values (1);
insert into table tbl_parquet values (2,'');
select * from tbl_parquet;
alter table tbl_parquet convert to iceberg;
select * from tbl_parquet;
> Dataloss post migrating a partitioned table to iceberg
> ------------------------------------------------------
>
> Key: HIVE-29098
> URL: https://issues.apache.org/jira/browse/HIVE-29098
> Project: Hive
> Issue Type: Bug
> Reporter: Vikram Ahuja
> Assignee: Vikram Ahuja
> Priority: Major
>
> Steps to reproduce:
> # drop table tbl_parquet;
> # create external table tbl_parquet(a int) partitioned by (b string) stored
> as parquet;
> # insert into table tbl_parquet partition (b='one') values (1);
> # insert into table tbl_parquet values (2,'');
>
> In Hive Engine:
> 1. select * from tbl_parquet;
> Result:
> ||a||b||
> |2|__HIVE_DEFAULT_PARTITION__|
> |1|one|
> 2. alter table tbl_parquet convert to iceberg;
> 3. select * from tbl_parquet;
> Result:
> ||a||b||
> |1|one|
>
>
> In Spark Engine:
> 1. select * from tbl_parquet;
> Result:
> ||a||b||
> |2|NULL|
> |1|one|
> 2. CALL spark_catalog.system.migrate('default.tbl_parquet');
> 3. select * from tbl_parquet;
> Result:
> ||a||b||
> |2|NULL|
> |1|one|
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)