dongjoon-hyun commented on a change in pull request #23740: [SPARK-26837][SQL] 
Pruning nested fields from object serializers
URL: https://github.com/apache/spark/pull/23740#discussion_r254571786
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
 ##########
 @@ -1680,6 +1681,62 @@ class DatasetSuite extends QueryTest with 
SharedSQLContext {
     checkAnswer(ds, Seq(Row("a"), Row("b"), Row("c")))
   }
 
+  test("SPARK-26837:Prune nested serializers") {
+    def testSerializer(df: DataFrame, structFields: Seq[Seq[String]]): Unit = {
+      val serializer = df.queryExecution.optimizedPlan.collect {
+        case s: SerializeFromObject => s
+      }.head
+
+      val structs = serializer.serializer(0).collect {
 
 Review comment:
   ~`serializer(0)` -> `serializer.head`.~
   Is this intentionally ignoring the second one like `Seq("_1")` at line 1716 
and line 1734?
   ```
   testSerializer(df4, Seq(Seq("_2", "_3"), Seq("_1")))
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to