-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
[SPARK-48186][SQL] Add support for AbstractMapType #46458
Closed
Closed
Conversation
This file contains 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
uros-db
changed the title
[WIP][SQL] Add support for AbstractMapType
[SPARK-48186][SQL] Add support for AbstractMapType
May 8, 2024
Could you resolve the conflict? |
@dongjoon-hyun resolved, please re-review |
cloud-fan
approved these changes
May 9, 2024
thanks, merging to master! |
JacobZheng0927
pushed a commit
to JacobZheng0927/spark
that referenced
this pull request
May 11, 2024
### What changes were proposed in this pull request? Addition of an abstract MapType (similar to abstract ArrayType in sql internal types) which accepts `StringTypeCollated` as `keyType` & `valueType`. Apart from extending this interface for all Spark functions, this PR also introduces collation awareness for json expression: schema_of_json. ### Why are the changes needed? This is needed in order to enable collation support for functions that use collated maps. ### Does this PR introduce _any_ user-facing change? Yes, users should now be able to use collated strings within arguments for json function: schema_of_json. ### How was this patch tested? E2e sql tests. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#46458 from uros-db/abstract-map. Authored-by: Uros Bojanic <157381213+uros-db@users.noreply.github.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
cloud-fan
pushed a commit
that referenced
this pull request
May 22, 2024
…r parameter map to work with collated strings ### What changes were proposed in this pull request? Following up on the introduction of AbstractMapType (#46458) and changes that introduce collation awareness for RaiseError expression (#46461), this PR should add the appropriate type casting rules for AbstractMapType. ### Why are the changes needed? Fix the CI failure for the `Support RaiseError misc expression with collation` test when ANSI is off. ### Does this PR introduce _any_ user-facing change? Yes, type casting is now allowed for map types with collated strings. ### How was this patch tested? Extended suite `CollationSQLExpressionsANSIOffSuite` with ANSI disabled. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #46661 from uros-db/fix-abstract-map. Authored-by: Uros Bojanic <157381213+uros-db@users.noreply.github.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
a0x8o
added a commit
to a0x8o/spark
that referenced
this pull request
May 22, 2024
…r parameter map to work with collated strings ### What changes were proposed in this pull request? Following up on the introduction of AbstractMapType (apache/spark#46458) and changes that introduce collation awareness for RaiseError expression (apache/spark#46461), this PR should add the appropriate type casting rules for AbstractMapType. ### Why are the changes needed? Fix the CI failure for the `Support RaiseError misc expression with collation` test when ANSI is off. ### Does this PR introduce _any_ user-facing change? Yes, type casting is now allowed for map types with collated strings. ### How was this patch tested? Extended suite `CollationSQLExpressionsANSIOffSuite` with ANSI disabled. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #46661 from uros-db/fix-abstract-map. Authored-by: Uros Bojanic <157381213+uros-db@users.noreply.github.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
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?
Addition of an abstract MapType (similar to abstract ArrayType in sql internal types) which accepts
StringTypeCollated
askeyType
&valueType
. Apart from extending this interface for all Spark functions, this PR also introduces collation awareness for json expression: schema_of_json.Why are the changes needed?
This is needed in order to enable collation support for functions that use collated maps.
Does this PR introduce any user-facing change?
Yes, users should now be able to use collated strings within arguments for json function: schema_of_json.
How was this patch tested?
E2e sql tests.
Was this patch authored or co-authored using generative AI tooling?
No.