Wenzhe Zhou has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21927 )

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


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21927/5/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/5/fe/src/main/java/org/apache/impala/planner/HdfsTableSink.java@456
PS5, Line 456: minWriters = numInputNodes;
             :         maxWriters = numInputNodes;
In this case, byteBasedNumWriters = numInputNodes.
You can re-organize code as:
  if (totalNumPartitions == 1) {
    byteBasedNumWriters = numInputNodes;
  } else {
    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: 5
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: Fri, 18 Oct 2024 17:22:55 +0000
Gerrit-HasComments: Yes

Reply via email to