Skip to content

[GLUTEN-12249][FLINK] Fix(gluten-flink/planner): use getValueAs() to extract VARCHAR literal value#12250

Open
ggjh-159 wants to merge 1 commit into
apache:mainfrom
ggjh-159:fix_varchar_nlsstring_prefix
Open

[GLUTEN-12249][FLINK] Fix(gluten-flink/planner): use getValueAs() to extract VARCHAR literal value#12250
ggjh-159 wants to merge 1 commit into
apache:mainfrom
ggjh-159:fix_varchar_nlsstring_prefix

Conversation

@ggjh-159

@ggjh-159 ggjh-159 commented Jun 5, 2026

Copy link
Copy Markdown

What changes are proposed in this pull request?

Use getValueAs(String.class) to get the plain value, consistent with the CHAR branch.
Related issue: #12249

How was this patch tested?

Manual test. Verified with nexmark q14 on Velox-Flink (10000 events, 2533 output rows):

  • Before fix: all 2533 rows output _UTF-16LE'nightTime' or _UTF-16LE'otherTime'
  • After fix: all 2533 rows output correct plain values (nightTime), matching native Flink output
  • Full field-by-field verification passed (auction, bidder, price, bidTimeType, dateTime, extra, c_counts)

Was this patch authored or co-authored using generative AI tooling?

@github-actions github-actions Bot added the FLINK label Jun 5, 2026
@ggjh-159 ggjh-159 force-pushed the fix_varchar_nlsstring_prefix branch 2 times, most recently from 04574ff to 53dd14c Compare June 8, 2026 07:51
@ggjh-159

ggjh-159 commented Jun 8, 2026

Copy link
Copy Markdown
Author

@philo-he @lgbo-ustc @zhanglistar @KevinyhZou Would you mind reviewing this PR?

@ggjh-159 ggjh-159 force-pushed the fix_varchar_nlsstring_prefix branch 3 times, most recently from 9ac6052 to 0939f47 Compare June 9, 2026 08:20
@github-actions github-actions Bot added the INFRA label Jun 9, 2026
Use getValueAs(String.class) instead of getValue().toString() which
produces "_UTF-16LE'value'" from NlsString.
@ggjh-159 ggjh-159 force-pushed the fix_varchar_nlsstring_prefix branch from 0939f47 to 100bd35 Compare June 10, 2026 03:57
@github-actions github-actions Bot removed the INFRA label Jun 10, 2026

@KevinyhZou KevinyhZou left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This problem also seems to exist in toVariant(Comparable ....) Of RexNodeConverter, can be fixed in another pr. LGTM

@ggjh-159

Copy link
Copy Markdown
Author

This problem also seems to exist in toVariant(Comparable ....) Of RexNodeConverter, can be fixed in another pr. LGTM

May be this pr? #12267

@KevinyhZou

Copy link
Copy Markdown
Contributor

yes, fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants