Skip to content

[SPARK-52444][SQL][Connect] Add support for Variant/Char/Varchar Literal #51215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dengziming
Copy link
Member

What changes were proposed in this pull request?

We are currently missing support for a number of DataTypes, add Variant/Char/Varchar in this PR,
Strings with Collation, YearMonthIntervalType with begin/end and DayTimeIntervalType with begin/end require us to change the expression structure and will be done in another PR.

Why are the changes needed?

Align the gap between literal expressions and data types.

Does this PR introduce any user-facing change?

Yes.

  1. API function fun.lit() can pass a VariantVal.
  2. Connect Literal expressions can pass Variant/Char/Varchar.

How was this patch tested?

  1. For Variant, add test in tests of fun.lit and fun.typedLit.
  2. For Char/Varchar that can't be tested by existing tests, add new tests in SparkConnectPlannerSuite.scala

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

No

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

Successfully merging this pull request may close these issues.

1 participant