Daniel Becker has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19507 )

Change subject: IMPALA-11854: ImpalaStringWritable's underlying array can't be 
changed in UDFs
......................................................................


Patch Set 12:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/19507/12/fe/src/main/java/org/apache/impala/hive/executor/ImpalaStringWritable.java
File fe/src/main/java/org/apache/impala/hive/executor/ImpalaStringWritable.java:

http://gerrit.cloudera.org:8080/#/c/19507/12/fe/src/main/java/org/apache/impala/hive/executor/ImpalaStringWritable.java@85
PS12, Line 85:   public void setCapacity(int newCap) {
We have pairs that do the same:
  setCapacity - setSize
  getCapacity - getLength
Can't we delete one of them?


http://gerrit.cloudera.org:8080/#/c/19507/12/fe/src/main/java/org/apache/impala/hive/executor/ImpalaStringWritable.java@89
PS12, Line 89:     if (newCap <= array_.length) {
Instead of returning here, we could invert the condition and have L92 in the 
body of the IF.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb28bd0dce7b0482c7abe1f61f245691fcbfe212
Gerrit-Change-Number: 19507
Gerrit-PatchSet: 12
Gerrit-Owner: Peter Rozsa <pro...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <daniel.bec...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pro...@cloudera.com>
Gerrit-Comment-Date: Tue, 28 Feb 2023 12:59:56 +0000
Gerrit-HasComments: Yes

Reply via email to