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/10/17 20:34:00 UTC

[GitHub] [spark] utkarsh39 commented on a change in pull request #34263: [SPARK-36978][SQL] InferConstraints rule should create IsNotNull constraints on the accessed nested field instead of the root nested type

utkarsh39 commented on a change in pull request #34263:
URL: https://github.com/apache/spark/pull/34263#discussion_r730472806



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/QueryPlanConstraints.scala
##########
@@ -117,11 +117,30 @@ trait ConstraintHelper {
       case _ => scanNullIntolerantAttribute(constraint).map(IsNotNull(_))
     }
 
+  private def isLeafExtractValue(e: ExtractValue): Boolean = {
+    e.children.map(c => c.isInstanceOf[Attribute] || c.isInstanceOf[Literal]).forall(_ == true)

Review comment:
       Sorry for my ignorance, this makes sense. I updated the PR




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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