Uh oh!
There was an error while loading. Please reload this page.
branch-4.1: [fix](be) Validate sequence pattern event numbers #64930 - #65038
Merged
Conversation
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
hello-stephen
commented
Jun 30, 2026
Contributor
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
hello-stephen
commented
Jun 30, 2026
Contributor
run buildall |
hello-stephen
commented
Jun 30, 2026
Contributor
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Jun 30, 2026
Contributor
FE UT Coverage ReportIncrement line coverage |
hello-stephen
commented
Jun 30, 2026
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Jun 30, 2026
Contributor
FE Regression Coverage ReportIncrement line coverage |
yiguolei
approved these changes
Jul 1, 2026
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picked from #64930