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

Change subject: IMPALA-15413: Truncate Parquet page index min/max on UTF-8 
boundaries
......................................................................


Patch Set 3:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/25008/2/be/src/util/string-util-test.cc
File be/src/util/string-util-test.cc:

http://gerrit.cloudera.org:8080/#/c/25008/2/be/src/util/string-util-test.cc@64
PS2, Line 64: \x
> Since these tests are about byte offsets, escaped bytes with the character
Done


http://gerrit.cloudera.org:8080/#/c/25008/2/be/src/util/string-util.h
File be/src/util/string-util.h:

http://gerrit.cloudera.org:8080/#/c/25008/2/be/src/util/string-util.h@37
PS2, Line 37: /// 'str' holds the maximum value of some string set. We want to 
truncate it
            : /// to only occupy 'max_length' bytes. We also want to guarantee 
that the truncated
            : /// value remains greater than all the strings in the original 
set, so we need
            : /// to increase it after truncation. E.g.: when 'max_length' == 
3: AAAAAAA => AAB
            : /// UTF-8 values are truncated as in TruncateDown(), then their 
last character that still
            : /// fits is replaced by the next code point, so the result stays 
valid UTF-8. Other
            : /// values, and UTF-8 values where nothing fits (e.g. all 
U+10FFFF), are increased
            : /// byte-wise.
> nit: I think we should merge the new comment with the older one so they don
Reworded to match the new behaviour.


http://gerrit.cloudera.org:8080/#/c/25008/2/be/src/util/string-util.cc
File be/src/util/string-util.cc:

http://gerrit.cloudera.org:8080/#/c/25008/2/be/src/util/string-util.cc@85
PS2, Line 85:   if (str.length() <= max_length) {
> If the truncated max is valid UTF-8 but can't be increased for cases like U
Done


http://gerrit.cloudera.org:8080/#/c/25008/2/be/src/util/utf8-util.h
File be/src/util/utf8-util.h:

http://gerrit.cloudera.org:8080/#/c/25008/2/be/src/util/utf8-util.h@38
PS2, Line 38: size_t TrimPartialUtf8(const char* ptr, size_t len);
> We can add a test for this in utf8-util-test.cc.
Done


http://gerrit.cloudera.org:8080/#/c/25008/2/tests/query_test/test_parquet_page_index.py
File tests/query_test/test_parquet_page_index.py:

http://gerrit.cloudera.org:8080/#/c/25008/2/tests/query_test/test_parquet_page_index.py@397
PS2, Line 397:   def test_utf8_string_values(self, vector, unique_database, 
tmpdir):
> Can we also test CHAR and VARCHAR?
Done


http://gerrit.cloudera.org:8080/#/c/25008/2/tests/query_test/test_parquet_page_index.py@403
PS2, Line 403: lues_sql = ("(cast(repea
> I think the increment was already handled by the old code and we should tes
removed 4-byte row


http://gerrit.cloudera.org:8080/#/c/25008/2/tests/query_test/test_parquet_page_index.py@407
PS2, Line 407: , vect
> This is not affecting either result.
using that as max


http://gerrit.cloudera.org:8080/#/c/25008/2/tests/query_test/test_parquet_page_index.py@414
PS2, Line 414:       assert len(column_index.max_values) == 1, col_type
> We should assert exact min/max bytes, like test_max_string_values.
Done



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib50b12a62cfad863825b1994b95a339ef6e5b788
Gerrit-Change-Number: 25008
Gerrit-PatchSet: 3
Gerrit-Owner: Daniel Vanko <[email protected]>
Gerrit-Reviewer: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Daniel Vanko <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Tue, 13 Oct 2026 18:29:47 +0000
Gerrit-HasComments: Yes

Reply via email to