Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/22603 )

Change subject: IMPALA-10349: Support constant folding for non ascii strings
......................................................................


Patch Set 13:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/22603/10/fe/src/main/java/org/apache/impala/util/StringUtils.java
File fe/src/main/java/org/apache/impala/util/StringUtils.java:

http://gerrit.cloudera.org:8080/#/c/22603/10/fe/src/main/java/org/apache/impala/util/StringUtils.java@37
PS10, Line 37:     return arr;
             :   }
> I see. Can we avoid creating an encoder each time? Using the following code
Convinced myself that java String->UTF8 conversion should always succeed, so 
this function is no longer necessary, using StandardCharsets.UTF_8.encode() 
directly is faster and simpler.


http://gerrit.cloudera.org:8080/#/c/22603/12/fe/src/main/java/org/apache/impala/util/StringUtils.java
File fe/src/main/java/org/apache/impala/util/StringUtils.java:

http://gerrit.cloudera.org:8080/#/c/22603/12/fe/src/main/java/org/apache/impala/util/StringUtils.java@37
PS12, Line 37:     return arr;
> nit: If we do need this, how about adding the string in the error message?
The function was removed, so this comment is no longer relevant. The same could 
be applied to fromUtf8Buffer, but I am not sure there, would it we useful to 
show the string, e.g. in hex?



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I70663457a0b0a3443e586350f0a5996bb75ba64a
Gerrit-Change-Number: 22603
Gerrit-PatchSet: 13
Gerrit-Owner: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Comment-Date: Tue, 24 Jun 2025 13:18:46 +0000
Gerrit-HasComments: Yes

Reply via email to