forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-45033][SQL] Support maps by parameterized
sql()
### What changes were proposed in this pull request? In the PR, I propose to allow a few more column expressions as parameters of `sql()` to construct maps/array: `CreateArray`, `MapFromArrays`, `CreateMap`, MapFromArrays` and `MapFromEntries`. Need to allow such expression because Spark SQL doesn't support constructing literals of the map type. ### Why are the changes needed? To improve user experience with Spark SQL, and support the rest built-in type. ### Does this PR introduce _any_ user-facing change? No. It extends the existing API. ### How was this patch tested? By running new tests: ``` $ build/sbt "test:testOnly *ParametersSuite" ``` ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#42752 from MaxGekk/parameterized-sql-create-map. Authored-by: Max Gekk <max.gekk@gmail.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
- Loading branch information
Showing
2 changed files
with
72 additions
and
5 deletions.
There are no files selected for viewing
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
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