Zoltan Borok-Nagy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21105 )

Change subject: IMPALA-12845: Crash with DESCRIBE on a complex type from an 
Iceberg table
......................................................................


Patch Set 3:

(3 comments)

Thanks for fixing this.

http://gerrit.cloudera.org:8080/#/c/21105/3//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/21105/3//COMMIT_MSG@23
PS3, Line 23: as they are
            : always nullable
Why are they always nullable? Nested type fields / elements can also be 
required:

https://iceberg.apache.org/spec/#nested-types

Or is it an Impala limitation?


http://gerrit.cloudera.org:8080/#/c/21105/3/fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java
File fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java:

http://gerrit.cloudera.org:8080/#/c/21105/3/fe/src/main/java/org/apache/impala/analysis/DescribeTableStmt.java@143
PS3, Line 143:     if (path_.destTable() != null) {
             :       return;
             :     }
You could use 'targetsTable()' here.

Also, the if statement fits a single line.

Btw, I think the early return statement is a bit smelly in this case. Early 
returns are good at the beginning of methods, but in the middle of a method it 
can be error-prone as one might adds extra code after it without realizing that 
we return.

So I think the following would be cleaner:

 if (!targetsTable()) {
   analyzeNonTable(analyzer);
 }


http://gerrit.cloudera.org:8080/#/c/21105/3/fe/src/main/java/org/apache/impala/service/Frontend.java
File fe/src/main/java/org/apache/impala/service/Frontend.java:

http://gerrit.cloudera.org:8080/#/c/21105/3/fe/src/main/java/org/apache/impala/service/Frontend.java@662
PS3, Line 662: && descStmt.getOutputStyle() == TDescribeOutputStyle.MINIMAL
Can we move this condition and the same from L672 and add them to the 'if 
(descStmt.targetsTable())?



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5eda21a41167cc1fda183aa16fd6276a6a16f5d3
Gerrit-Change-Number: 21105
Gerrit-PatchSet: 3
Gerrit-Owner: Daniel Becker <daniel.bec...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <daniel.bec...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <gaborkas...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <npaptak...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <borokna...@cloudera.com>
Gerrit-Comment-Date: Thu, 07 Mar 2024 13:58:49 +0000
Gerrit-HasComments: Yes

Reply via email to