viirya commented on a change in pull request #23353: [SPARK-26402][SQL] 
Canonicalization on GetStructField 
URL: https://github.com/apache/spark/pull/23353#discussion_r243130390
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Canonicalize.scala
 ##########
 @@ -41,6 +41,7 @@ object Canonicalize {
   private[expressions] def ignoreNamesTypes(e: Expression): Expression = e 
match {
     case a: AttributeReference =>
       AttributeReference("none", a.dataType.asNullable)(exprId = a.exprId)
+    case GetStructField(child, ordinal, Some(_)) => GetStructField(child, 
ordinal, None)
 
 Review comment:
   The comment of `Canonicalize` says:
   
   ```
   The following rules are applied:
    *  - Names and nullability hints for 
[[org.apache.spark.sql.types.DataType]]s are stripped.
   ...
   ```
   
   It's also needed to be update.

----------------------------------------------------------------
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