Riza Suminto has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21964 )

Change subject: IMPALA-13467: Fix partition list size calculation for empty 
Iceberg scan nodes
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21964/3/fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java
File fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java:

http://gerrit.cloudera.org:8080/#/c/21964/3/fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java@1213
PS3, Line 1213:     int partitionsSize = getSampledOrRawPartitions().size();
              :     // Iceberg tables always have one partition, even if the 
scan node contains zero
              :     // file descriptors. TODO: IMPALA-13267
              :     if (this instanceof IcebergScanNode && 
this.fileFormats_.isEmpty()) {
              :       partitionsSize = 0;
              :     }
              :     boolean allParquet = partitionsSize > 0;
              :     boolean allColumnarFormat = partitionsSize > 0;
I think I prefer this to be written this way:

    // Assume all table files are in parquet format and all in columnar format 
until proven otherwise.
    boolean allParquet = true;
    boolean allColumnarFormat = true;

    if (this instanceof IcebergScanNode && this.fileFormats_.isEmpty()) {
      // Iceberg tables always have one partition, even if the scan node 
contains zero
      // file descriptors. TODO: IMPALA-13267
      allParquet = false;
      allColumnarFormat = false;
    } else {
      // If table has no partition, then it is not all parquet nor it is all 
columnar.
      int partitionsSize = getSampledOrRawPartitions().size();
      allParquet = partitionsSize > 0;
      allColumnarFormat = partitionsSize > 0;
    }



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5a0595831f3bd87074144ab7d5da27508e73ef33
Gerrit-Change-Number: 21964
Gerrit-PatchSet: 3
Gerrit-Owner: Peter Rozsa <[email protected]>
Gerrit-Reviewer: Daniel Becker <[email protected]>
Gerrit-Reviewer: Gabor Kaszab <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>
Gerrit-Comment-Date: Fri, 25 Oct 2024 21:41:38 +0000
Gerrit-HasComments: Yes

Reply via email to