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

Change subject: IMPALA-13445: Ignore num partition for unpartitioned writes
......................................................................


Patch Set 2:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/21927/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/21927/2//COMMIT_MSG@26
PS2, Line 26: Testing
Is it possible to add planner tests? Also for Iceberg tables?


http://gerrit.cloudera.org:8080/#/c/21927/2/fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java
File fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java:

http://gerrit.cloudera.org:8080/#/c/21927/2/fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java@245
PS2, Line 245: root.getAvgRowSize() == 0)
Is it possible to have avg row size 0?


http://gerrit.cloudera.org:8080/#/c/21927/2/fe/src/main/java/org/apache/impala/planner/HdfsTableSink.java
File fe/src/main/java/org/apache/impala/planner/HdfsTableSink.java:

http://gerrit.cloudera.org:8080/#/c/21927/2/fe/src/main/java/org/apache/impala/planner/HdfsTableSink.java@448
PS2, Line 448:       int minWriters = (int) Math.min(numInputNodes, 
totalNumPartitions);
             :       if (byteBasedNumWriters <= minWriters) {
             :         // Utilize all input nodes if possible.
             :         // This is OK beacuse individual partition most likely 
is less than
             :         // MIN_WRITE_BYTES.
             :         byteBasedNumWriters = minWriters;
             :       } else {
             :         // Cap byteBasedNumWriters at most totalNumPartitions.
             :         byteBasedNumWriters = Math.min(byteBasedNumWriters, 
totalNumPartitions);
             :       }
Could it be written as the following?

 long minWriters = Math.min(numInputNodes, totalNumPartitions);
 long maxWriters = totalNumPartitions;

 byteBasedNumWriters = Math.max(minWriters, byteBasedNumWriters);
 byteBasedNumWriters = Math.min(maxWriters, byteBasedNumWriters);



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I51ab8fc35a5489351a88d372b28642b35449acfc
Gerrit-Change-Number: 21927
Gerrit-PatchSet: 2
Gerrit-Owner: Riza Suminto <[email protected]>
Gerrit-Reviewer: Abhishek Rawat <[email protected]>
Gerrit-Reviewer: David Rorke <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>
Gerrit-Reviewer: Wenzhe Zhou <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Thu, 17 Oct 2024 16:22:14 +0000
Gerrit-HasComments: Yes

Reply via email to