[GLUTEN-12266][FLINK] Fix UnsatisfiedLinkError when IN predicate uses strin…#12267
Open
ggjh-159 wants to merge 1 commit into
Open
[GLUTEN-12266][FLINK] Fix UnsatisfiedLinkError when IN predicate uses strin…#12267ggjh-159 wants to merge 1 commit into
ggjh-159 wants to merge 1 commit into
Conversation
5bcd1d4 to
15fa6f5
Compare
15fa6f5 to
38fa7da
Compare
38fa7da to
fa1b6c4
Compare
fa1b6c4 to
a35864e
Compare
Author
|
@philo-he @lgbo-ustc @zhanglistar @KevinyhZou Would you mind reviewing 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.
related issue: #12266
What changes are proposed in this pull request?
Fix two bugs in
RexNodeConverter.javathat break IN predicate with string values in Gluten-Flink planner.ConstantTypedExpr.create(Variant)callsStaticJniApi.variantInferType()via JNI to infer type, but the planner runs in SQL client process where native library is not loaded, causingUnsatisfiedLinkError. The type is already available fromrelDataType, so we use the 3-arg constructor to pass it directly.NlsString.toString()returns SQL display format (e.g."_UTF-16LE'apple'") instead of raw string, causing the serialized IN list to contain malformed values that never match. Fix by checkinginstanceof NlsStringand callinggetValue().Note: A companion fix in velox4j is also needed for
REGEXP_EXTRACTreturning empty string instead of NULL on no match. See bigo-sg/velox4j #31.How was this patch tested?
Manual test. Tested by running Nexmark Q21 on Gluten-Flink with 10000 events. Previously crashed at submission with
UnsatisfiedLinkError. After this fix, the query submits successfully and produces correct results (8754 output rows matching Flink native execution).Was this patch authored or co-authored using generative AI tooling?