You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/30 21:19:42 UTC

[GitHub] [spark] viirya commented on a change in pull request #32354: [SPARK-35232][SQL] Nested column pruning should retain column metadata

viirya commented on a change in pull request #32354:
URL: https://github.com/apache/spark/pull/32354#discussion_r624215231



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SchemaPruning.scala
##########
@@ -127,7 +128,8 @@ object SchemaPruning extends SQLConfHelper {
   private def getRootFields(expr: Expression): Seq[RootField] = {
     expr match {
       case att: Attribute =>
-        RootField(StructField(att.name, att.dataType, att.nullable), derivedFromAtt = true) :: Nil
+        RootField(StructField(att.name, att.dataType, att.nullable, att.metadata),

Review comment:
       Can we add a unit test in `SchemaPruningSuite`? We can make `getRootFields` as `private[spark]` to test it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org