You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Zoltán Borók-Nagy (Jira)" <ji...@apache.org> on 2022/06/09 13:21:00 UTC

[jira] [Comment Edited] (IMPALA-11053) Impala should be able to read migrated partitioned Iceberg tables

    [ https://issues.apache.org/jira/browse/IMPALA-11053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17552203#comment-17552203 ] 

Zoltán Borók-Nagy edited comment on IMPALA-11053 at 6/9/22 1:20 PM:
--------------------------------------------------------------------

Thanks [~LiPenglin] I'm observing a bit different behavior:
{noformat}
[localhost:21050] default> select * from functional_parquet.iceberg_alltypes_part where p_bool=false;
Fetched 0 row(s) in 0.11s

[localhost:21050] default> select * from functional_parquet.iceberg_alltypes_part where p_bool=true;
ERROR: Unable to find SchemaNode for path 'functional_parquet.iceberg_alltypes_part.p_bool' in the schema of file 'hdfs://localhost:20500/test-warehouse/iceberg_test/hadoop_catalog/ice/iceberg_alltypes_part/p_bool=true/p_int=1/p_bigint=11/p_float=1.1/p_double=2.222/p_decimal=123.321/p_date=2022-02-22/p_string=impala/000000_0'.

[localhost:21050] default> select * from functional_parquet.iceberg_alltypes_part where i=3;
Fetched 0 row(s) in 0.12s

[localhost:21050] default> select * from functional_parquet.iceberg_alltypes_part where i=1;
+---+--------+-------+----------+---------------+----------+-----------+------------+----------+
| i | p_bool | p_int | p_bigint | p_float       | p_double | p_decimal | p_date     | p_string |
+---+--------+-------+----------+---------------+----------+-----------+------------+----------+
| 1 | true   | 1     | 11       | 1.10000002384 | 2.222    | 123.321   | 2022-02-22 | impala   |
+---+--------+-------+----------+---------------+----------+-----------+------------+----------+
Fetched 1 row(s) in 0.12s

[localhost:21050] default> select * from functional_parquet.iceberg_alltypes_part where p_int=1;
ERROR: Unable to find SchemaNode for path 'functional_parquet.iceberg_alltypes_part.p_int' in the schema of file 'hdfs://localhost:20500/test-warehouse/iceberg_test/hadoop_catalog/ice/iceberg_alltypes_part/p_bool=true/p_int=1/p_bigint=11/p_float=1.1/p_double=2.222/p_decimal=123.321/p_date=2022-02-22/p_string=impala/000000_0'.

[localhost:21050] default> select * from functional_parquet.iceberg_alltypes_part where p_int=3;
Fetched 0 row(s) in 0.11s{noformat}
So I don't get incorrect results at least, but getting errors on partition column values that are existing.

UPDATE: it seems like it works well with ORC.


was (Author: boroknagyz):
Thanks [~LiPenglin] I'm observing a bit different behavior:
{noformat}
[localhost:21050] default> select * from functional_parquet.iceberg_alltypes_part where p_bool=false;
Fetched 0 row(s) in 0.11s

[localhost:21050] default> select * from functional_parquet.iceberg_alltypes_part where p_bool=true;
ERROR: Unable to find SchemaNode for path 'functional_parquet.iceberg_alltypes_part.p_bool' in the schema of file 'hdfs://localhost:20500/test-warehouse/iceberg_test/hadoop_catalog/ice/iceberg_alltypes_part/p_bool=true/p_int=1/p_bigint=11/p_float=1.1/p_double=2.222/p_decimal=123.321/p_date=2022-02-22/p_string=impala/000000_0'.

[localhost:21050] default> select * from functional_parquet.iceberg_alltypes_part where i=3;
Fetched 0 row(s) in 0.12s

[localhost:21050] default> select * from functional_parquet.iceberg_alltypes_part where i=1;
+---+--------+-------+----------+---------------+----------+-----------+------------+----------+
| i | p_bool | p_int | p_bigint | p_float       | p_double | p_decimal | p_date     | p_string |
+---+--------+-------+----------+---------------+----------+-----------+------------+----------+
| 1 | true   | 1     | 11       | 1.10000002384 | 2.222    | 123.321   | 2022-02-22 | impala   |
+---+--------+-------+----------+---------------+----------+-----------+------------+----------+
Fetched 1 row(s) in 0.12s

[localhost:21050] default> select * from functional_parquet.iceberg_alltypes_part where p_int=1;
ERROR: Unable to find SchemaNode for path 'functional_parquet.iceberg_alltypes_part.p_int' in the schema of file 'hdfs://localhost:20500/test-warehouse/iceberg_test/hadoop_catalog/ice/iceberg_alltypes_part/p_bool=true/p_int=1/p_bigint=11/p_float=1.1/p_double=2.222/p_decimal=123.321/p_date=2022-02-22/p_string=impala/000000_0'.

[localhost:21050] default> select * from functional_parquet.iceberg_alltypes_part where p_int=3;
Fetched 0 row(s) in 0.11s{noformat}
So I don't get incorrect results at least, but getting errors on partition column values that are existing.

> Impala should be able to read migrated partitioned Iceberg tables
> -----------------------------------------------------------------
>
>                 Key: IMPALA-11053
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11053
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Zoltán Borók-Nagy
>            Assignee: Zoltán Borók-Nagy
>            Priority: Major
>              Labels: impala-iceberg
>             Fix For: Impala 4.1.0
>
>
> When Hive (and probably other engines as well) converts a legacy Hive table to Iceberg it doesn't rewrite the data files.
> It means that the data files don't have write ids, moreover they don't have the partition columns neither.
> Currently Impala expects tha partition columns to be present in the data files, so it won't be able to read converted partitioned tables.
> So we need to inject partition values from the Iceberg metadata, plus resolve columns correctly (position-based resolution needs an offset).



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org