airborne12 commented on code in PR #67918:
URL: https://github.com/apache/doris/pull/67918#discussion_r4065376130


##########
be/src/storage/index/inverted/tokenizer/ngram/ngram_tokenizer.cpp:
##########
@@ -74,6 +74,10 @@ Token* NGramTokenizer::next(Token* token) {
 
         to_chars(_buffer, _buffer_start, _gram_size);
         set(token, _utf8_buffer);
+        set_source_byte_offsets(_utf8_buffer, _offset);

Review Comment:
   Fixed in 31450230. NGram reset now validates the raw input and rejects 
malformed UTF-8 with `INVALID_ARGUMENT`, so it cannot compress source 
coordinates by dropping bytes. The test covers leading and interior invalid 
bytes plus successful reuse on valid input.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to