You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Zoltan Borok-Nagy (Code Review)" <ge...@cloudera.org> on 2023/09/05 16:58:59 UTC

[Impala-ASF-CR] IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala

Zoltan Borok-Nagy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/20453


Change subject: IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala
......................................................................

IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala

Trino creates Iceberg tables without 'engine.hive.enabled'='true'. It
also doesn't provide a way for users to set this property. Therefore
Trino always creates Iceberg tables with non-HiveIceberg storage
descriptors.

Impala uses the Input/Output/SerDe properties to recognize table types.
This change relaxes this a bit for Iceberg tables, i.e. a table is also
considered to be an Iceberg table if the table property
'table_type'='ICEBERG' is set.

During table loading Impala uses an internal HDFS table to load table
metadata. It currently throws an exception when no proper storage
descriptor is being set. To workaround this, IcebergTable changes
the in-memory HMS table's storage descriptor properties to the
HiveIceberg* properties. Normally, this shouldn't persist to the
HMS database on read operations. Though it wouldn't harm AFAICT, we
just want to be on the safe side.

Modifications to the table from Impala goes through its Iceberg
libary (with 'engine.hive.enabled'='true'), which means we set
the HiveIceberg storage descriptors. Trino is still compatible with
such tables.

Testing
 * Manually tested with Trino
 * IMPALA-12422 will add interop tests once we have Trino in the
   minicluster environment

Change-Id: I18ea3858314d70a6131982a4e4d3ca90a95a311a
---
M fe/src/main/java/org/apache/impala/catalog/FeIcebergTable.java
M fe/src/main/java/org/apache/impala/catalog/IcebergTable.java
M fe/src/main/java/org/apache/impala/catalog/local/LocalIcebergTable.java
3 files changed, 28 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/53/20453/1
-- 
To view, visit http://gerrit.cloudera.org:8080/20453
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I18ea3858314d70a6131982a4e4d3ca90a95a311a
Gerrit-Change-Number: 20453
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>

[Impala-ASF-CR] IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala

Posted by "Gabor Kaszab (Code Review)" <ge...@cloudera.org>.
Gabor Kaszab has posted comments on this change. ( http://gerrit.cloudera.org:8080/20453 )

Change subject: IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala
......................................................................


Patch Set 2: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/20453
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I18ea3858314d70a6131982a4e4d3ca90a95a311a
Gerrit-Change-Number: 20453
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tamas Mate <tm...@apache.org>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Thu, 07 Sep 2023 11:01:06 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20453 )

Change subject: IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala
......................................................................


Patch Set 3:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/9682/ DRY_RUN=false


-- 
To view, visit http://gerrit.cloudera.org:8080/20453
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I18ea3858314d70a6131982a4e4d3ca90a95a311a
Gerrit-Change-Number: 20453
Gerrit-PatchSet: 3
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tamas Mate <tm...@apache.org>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Thu, 07 Sep 2023 11:09:10 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala

Posted by "Gabor Kaszab (Code Review)" <ge...@cloudera.org>.
Gabor Kaszab has posted comments on this change. ( http://gerrit.cloudera.org:8080/20453 )

Change subject: IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/20453/1/fe/src/main/java/org/apache/impala/catalog/IcebergTable.java
File fe/src/main/java/org/apache/impala/catalog/IcebergTable.java:

http://gerrit.cloudera.org:8080/#/c/20453/1/fe/src/main/java/org/apache/impala/catalog/IcebergTable.java@250
PS1, Line 250: msTbl.getSd().getInputFormat()
You can replace this with 'inputFormat'


http://gerrit.cloudera.org:8080/#/c/20453/1/fe/src/main/java/org/apache/impala/catalog/IcebergTable.java@355
PS1, Line 355:       FeIcebergTable.setIcebergStorageDescriptor(msTable_);
Could you add a comment for future readers why this is set here?


http://gerrit.cloudera.org:8080/#/c/20453/1/fe/src/main/java/org/apache/impala/catalog/IcebergTable.java@392
PS1, Line 392:       FeIcebergTable.resetIcebergStorageDescriptor(msTable_, msTbl);
What if we let this storage descriptor persist in HMS? Wouldn't it help for Hive to also be able to read the table? I guess with the lack of 'hive.enabled' flag it still wouldn't be able to but wondering.



-- 
To view, visit http://gerrit.cloudera.org:8080/20453
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I18ea3858314d70a6131982a4e4d3ca90a95a311a
Gerrit-Change-Number: 20453
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tamas Mate <tm...@apache.org>
Gerrit-Comment-Date: Thu, 07 Sep 2023 08:07:20 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20453 )

Change subject: IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala
......................................................................


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/13916/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/20453
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I18ea3858314d70a6131982a4e4d3ca90a95a311a
Gerrit-Change-Number: 20453
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tamas Mate <tm...@apache.org>
Gerrit-Comment-Date: Tue, 05 Sep 2023 17:25:13 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala

Posted by "Zoltan Borok-Nagy (Code Review)" <ge...@cloudera.org>.
Hello Tamas Mate, Gabor Kaszab, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/20453

to look at the new patch set (#2).

Change subject: IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala
......................................................................

IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala

Trino creates Iceberg tables without 'engine.hive.enabled'='true'. It
also doesn't provide a way for users to set this property. Therefore
Trino always creates Iceberg tables with non-HiveIceberg storage
descriptors.

Impala uses the Input/Output/SerDe properties to recognize table types.
This change relaxes this a bit for Iceberg tables, i.e. a table is also
considered to be an Iceberg table if the table property
'table_type'='ICEBERG' is set.

During table loading Impala uses an internal HDFS table to load table
metadata. It currently throws an exception when no proper storage
descriptor is being set. To workaround this, IcebergTable changes
the in-memory HMS table's storage descriptor properties to the
HiveIceberg* properties. Normally, this shouldn't persist to the
HMS database on read operations. Though it wouldn't harm AFAICT, we
just want to be on the safe side.

Modifications to the table from Impala goes through its Iceberg
libary (with 'engine.hive.enabled'='true'), which means we set
the HiveIceberg storage descriptors. Trino is still compatible with
such tables.

Testing
 * Manually tested with Trino
 * IMPALA-12422 will add interop tests once we have Trino in the
   minicluster environment

Change-Id: I18ea3858314d70a6131982a4e4d3ca90a95a311a
---
M fe/src/main/java/org/apache/impala/catalog/FeIcebergTable.java
M fe/src/main/java/org/apache/impala/catalog/IcebergTable.java
M fe/src/main/java/org/apache/impala/catalog/local/LocalIcebergTable.java
3 files changed, 32 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/53/20453/2
-- 
To view, visit http://gerrit.cloudera.org:8080/20453
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I18ea3858314d70a6131982a4e4d3ca90a95a311a
Gerrit-Change-Number: 20453
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tamas Mate <tm...@apache.org>

[Impala-ASF-CR] IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20453 )

Change subject: IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala
......................................................................


Patch Set 3: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/20453
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I18ea3858314d70a6131982a4e4d3ca90a95a311a
Gerrit-Change-Number: 20453
Gerrit-PatchSet: 3
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tamas Mate <tm...@apache.org>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Thu, 07 Sep 2023 11:09:10 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20453 )

Change subject: IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala
......................................................................


Patch Set 3: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/20453
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I18ea3858314d70a6131982a4e4d3ca90a95a311a
Gerrit-Change-Number: 20453
Gerrit-PatchSet: 3
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tamas Mate <tm...@apache.org>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Thu, 07 Sep 2023 15:29:39 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala

Posted by "Zoltan Borok-Nagy (Code Review)" <ge...@cloudera.org>.
Zoltan Borok-Nagy has posted comments on this change. ( http://gerrit.cloudera.org:8080/20453 )

Change subject: IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala
......................................................................


Patch Set 1:

(3 comments)

Thanks for the comments!

http://gerrit.cloudera.org:8080/#/c/20453/1/fe/src/main/java/org/apache/impala/catalog/IcebergTable.java
File fe/src/main/java/org/apache/impala/catalog/IcebergTable.java:

http://gerrit.cloudera.org:8080/#/c/20453/1/fe/src/main/java/org/apache/impala/catalog/IcebergTable.java@250
PS1, Line 250: msTbl.getSd().getInputFormat()
> You can replace this with 'inputFormat'
Done


http://gerrit.cloudera.org:8080/#/c/20453/1/fe/src/main/java/org/apache/impala/catalog/IcebergTable.java@355
PS1, Line 355:       FeIcebergTable.setIcebergStorageDescriptor(msTable_);
> Could you add a comment for future readers why this is set here?
Done


http://gerrit.cloudera.org:8080/#/c/20453/1/fe/src/main/java/org/apache/impala/catalog/IcebergTable.java@392
PS1, Line 392:       FeIcebergTable.resetIcebergStorageDescriptor(msTable_, msTbl);
> What if we let this storage descriptor persist in HMS? Wouldn't it help for
It shouldn't hurt setting the storage descriptors (because they should use Impala with a relatively new HMS, and other engines should just ignore these properties), but if they only read the table via Impala it's probably nicer to leave the table as is, so we don't introduce unexpected bugs.

If someone modifies the table via Impala, e.g. creates a new snapshot, it's a bit different story, in that case we update the storage descriptors.

Setting the storage descriptors / storage handler would help Hive read the table, but I think it shouldn't matter for our implementation. Hive needs to deal with such tables anyway.



-- 
To view, visit http://gerrit.cloudera.org:8080/20453
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I18ea3858314d70a6131982a4e4d3ca90a95a311a
Gerrit-Change-Number: 20453
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tamas Mate <tm...@apache.org>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Thu, 07 Sep 2023 10:18:31 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/20453 )

Change subject: IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala
......................................................................

IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala

Trino creates Iceberg tables without 'engine.hive.enabled'='true'. It
also doesn't provide a way for users to set this property. Therefore
Trino always creates Iceberg tables with non-HiveIceberg storage
descriptors.

Impala uses the Input/Output/SerDe properties to recognize table types.
This change relaxes this a bit for Iceberg tables, i.e. a table is also
considered to be an Iceberg table if the table property
'table_type'='ICEBERG' is set.

During table loading Impala uses an internal HDFS table to load table
metadata. It currently throws an exception when no proper storage
descriptor is being set. To workaround this, IcebergTable changes
the in-memory HMS table's storage descriptor properties to the
HiveIceberg* properties. Normally, this shouldn't persist to the
HMS database on read operations. Though it wouldn't harm AFAICT, we
just want to be on the safe side.

Modifications to the table from Impala goes through its Iceberg
libary (with 'engine.hive.enabled'='true'), which means we set
the HiveIceberg storage descriptors. Trino is still compatible with
such tables.

Testing
 * Manually tested with Trino
 * IMPALA-12422 will add interop tests once we have Trino in the
   minicluster environment

Change-Id: I18ea3858314d70a6131982a4e4d3ca90a95a311a
Reviewed-on: http://gerrit.cloudera.org:8080/20453
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M fe/src/main/java/org/apache/impala/catalog/FeIcebergTable.java
M fe/src/main/java/org/apache/impala/catalog/IcebergTable.java
M fe/src/main/java/org/apache/impala/catalog/local/LocalIcebergTable.java
3 files changed, 32 insertions(+), 3 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/20453
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I18ea3858314d70a6131982a4e4d3ca90a95a311a
Gerrit-Change-Number: 20453
Gerrit-PatchSet: 4
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tamas Mate <tm...@apache.org>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>

[Impala-ASF-CR] IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20453 )

Change subject: IMPALA-12413: Make Iceberg tables created by Trino compatible with Impala
......................................................................


Patch Set 2:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/13937/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/20453
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I18ea3858314d70a6131982a4e4d3ca90a95a311a
Gerrit-Change-Number: 20453
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tamas Mate <tm...@apache.org>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Thu, 07 Sep 2023 10:43:41 +0000
Gerrit-HasComments: No