HappenLee opened a new pull request, #64930:
URL: https://github.com/apache/doris/pull/64930

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary: sequence_match and sequence_count accepted syntactically 
valid but semantically invalid event indexes such as (?0) and indexes larger 
than the number of event predicates. In BE, (?0) underflowed before bitset 
access and could abort the backend; the upper bound also allowed one 
nonexistent event. This change validates the event number range in Nereids and 
keeps the BE parser from using event_number - 1 until the range is checked.
   
   ### Release note
   
   Fix sequence_match and sequence_count to reject out-of-range event numbers 
instead of risking backend abort.
   
   ### Check List (For Author)
   
   - Test:
       - Unit Test: ./run-be-ut.sh --clean --run --filter=VSequenceMatchTest.*
       - Manual test: PATH=/mnt/disk6/common/ldb_toolchain_toucan/bin:$PATH 
build-support/clang-format.sh
       - Manual test: PATH=/mnt/disk6/common/ldb_toolchain_toucan/bin:$PATH 
build-support/check-format.sh
       - Manual test: build-support/run-clang-tidy.sh --build-dir 
be/ut_build_ASAN
       - Manual test: ./build.sh --fe --clean
       - Regression test: Not run locally because no isolated worktree Doris 
cluster was started; added regression coverage for CI.
   - Behavior changed: Yes. Invalid sequence_match and sequence_count event 
numbers now return analysis errors or an empty BE-side match instead of 
reaching invalid bitset indexes.
   - Does this need documentation: No


-- 
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