aokolnychyi commented on code in PR #36303:
URL: https://github.com/apache/spark/pull/36303#discussion_r855390527
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SchemaPruning.scala:
##########
@@ -152,6 +152,10 @@ object SchemaPruning extends SQLConfHelper {
RootField(field, derivedFromAtt = false, prunedIfAnyChildAccessed =
true) :: Nil
case IsNotNull(_: Attribute) | IsNull(_: Attribute) =>
expr.children.flatMap(getRootFields).map(_.copy(prunedIfAnyChildAccessed =
true))
+ case s: SubqueryExpression =>
Review Comment:
Initially, I tried another approach. I was passing `AttributeSet` with table
attributes and checking above if an attribute belongs to the table output.
However, that required changing many places. This change is much smaller. Let
me know if there are cases when this will not work.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]