-
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-19089][SQL] Add support for nested sequences #18011
Conversation
ok to test |
@@ -258,6 +258,10 @@ class DatasetPrimitiveSuite extends QueryTest with SharedSQLContext { | |||
ListClass(List(1)) -> Queue("test" -> SeqClass(Seq(2)))) | |||
} | |||
|
|||
test("nested sequences") { | |||
checkDataset(Seq(Seq(Seq(1))).toDS(), Seq(Seq(1))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's also add test for specific collection type, e.g. List(Queue(1))
LGTM |
Test build #77040 has finished for PR 18011 at commit
|
retest this please |
1 similar comment
retest this please |
Test build #77076 has finished for PR 18011 at commit
|
Test build #77093 has finished for PR 18011 at commit
|
thanks, merging to master/2.2! |
## What changes were proposed in this pull request? Replaced specific sequence encoders with generic sequence encoder to enable nesting of sequences. Does not add support for nested arrays as that cannot be solved in this way. ## How was this patch tested? ```bash build/mvn -DskipTests clean package && dev/run-tests ``` Additionally in Spark shell: ``` scala> Seq(Seq(Seq(1))).toDS.collect() res0: Array[Seq[Seq[Int]]] = Array(List(List(1))) ``` Author: Michal Senkyr <mike.senkyr@gmail.com> Closes #18011 from michalsenkyr/dataset-seq-nested. (cherry picked from commit a2b3b67) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
## What changes were proposed in this pull request? Replaced specific sequence encoders with generic sequence encoder to enable nesting of sequences. Does not add support for nested arrays as that cannot be solved in this way. ## How was this patch tested? ```bash build/mvn -DskipTests clean package && dev/run-tests ``` Additionally in Spark shell: ``` scala> Seq(Seq(Seq(1))).toDS.collect() res0: Array[Seq[Seq[Int]]] = Array(List(List(1))) ``` Author: Michal Senkyr <mike.senkyr@gmail.com> Closes apache#18011 from michalsenkyr/dataset-seq-nested.
What changes were proposed in this pull request?
Replaced specific sequence encoders with generic sequence encoder to enable nesting of sequences.
Does not add support for nested arrays as that cannot be solved in this way.
How was this patch tested?
build/mvn -DskipTests clean package && dev/run-tests
Additionally in Spark shell: