cloud-fan commented on code in PR #48091:
URL: https://github.com/apache/spark/pull/48091#discussion_r1763519874
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -5854,7 +5854,20 @@ class AstBuilder extends DataTypeAstBuilder
windowClause = null,
relation = left,
isPipeOperatorSelect = true)
- }.get
+ }.getOrElse(Option(ctx.whereClause).map { c =>
+ // Add a table subquery boundary between the new filter and the input
plan if one does not
+ // already exist. This helps the analyzer behave as if we had added the
WHERE clause after a
+ // table subquery containing the input plan.
Review Comment:
that being said, seems like we don't need to add subquery alias if the child
plan is `UnresolvedRelation`. We don't need to isolate the table scan node here.
--
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]