HIVE-29618: fix multiline string matches for vectorization too (follows up on HIVE-22008)#6494
Open
konstantinb wants to merge 1 commit into
Open
HIVE-29618: fix multiline string matches for vectorization too (follows up on HIVE-22008)#6494konstantinb wants to merge 1 commit into
konstantinb wants to merge 1 commit into
Conversation
…ws up on HIVE-22008)
konstantinb
commented
May 15, 2026
| POSTHOOK: type: QUERY | ||
| POSTHOOK: Input: default@splitlinesunderscore | ||
| #### A masked pattern was here #### | ||
| 2 |
Contributor
Author
There was a problem hiding this comment.
the value was 0 before the code changes of this PR
|
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 free
to 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.



What changes were proposed in this pull request?
HIVE-29618: fix multiline string matches for vectorization too (follows up on HIVE-22008)
Add the
Pattern.DOTALLflag to the vectorizedLIKEoperator'sComplexCheckerregex compile (AbstractFilterStringColLikeStringScalar.java:422), restoring parity with the non-vectorizedUDFLike(UDFLike.java:194, fixed by HIVE-22008 in 2019). Extendudf_like.qwith a regression test for theCOMPLEX/regex path and run every statement once more withhive.vectorized.execution.enabled=falseto lock in cross-mode parity. Add a focused Java unit test inTestVectorStringExpressions.Why are the changes needed?
d7475aa
HIVE-22008 fixed non-vectorized LIKE to match multi-line input but missed the parallel vectorized implementation. Patterns containing an unescaped
_route throughComplexChecker, which compiledits regex without
DOTALL; the resulting.(from_) and.*?(from%) cannot cross newlines, so vectorized LIKE silently drops rows whose values contain\n. The result is silently wrongquery output — the same
LIKEquery returns different row counts in vectorized vs non-vectorized mode.Does this PR introduce any user-facing change?
Yes, as a bug fix. Vectorized
LIKEpatterns containing_now match multi-line strings consistently with non-vectorized execution and with SQL semantics. Queries that previously dropped rows nowreturn them. No syntax, API, or config changes.
How was this patch tested?
TestVectorStringExpressions#testStringLikeComplexCheckerMultiLine— fails before the fix, passes after.udf_like.qextended; the regeneratedudf_like.q.outdiffers from the pre-fix snapshot by a single character (0→2) at the new test's vectorized-mode result line — every other expectedoutput is unchanged.
mvn checkstyle:check -pl qlclean.udf_likegolden.