[ https://issues.apache.org/jira/browse/SPARK-46640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan reassigned SPARK-46640: ----------------------------------- Assignee: Nikhil Sheoran > RemoveRedundantAliases does not account for SubqueryExpression when removing > aliases > ------------------------------------------------------------------------------------ > > Key: SPARK-46640 > URL: https://issues.apache.org/jira/browse/SPARK-46640 > Project: Spark > Issue Type: Bug > Components: Optimizer > Affects Versions: 4.0.0 > Reporter: Nikhil Sheoran > Assignee: Nikhil Sheoran > Priority: Minor > Labels: pull-request-available > Fix For: 4.0.0, 3.5.1 > > > `RemoveRedundantAliases{{{}`{}}} does not take into account the outer > attributes of a `SubqueryExpression` aliases, potentially removing them if it > thinks they are redundant. > This can cause scenarios where a subquery expression has conditions like `a#x > = a#x` i.e. both the attribute names and the expression ID(s) are the same. > This can then lead to conflicting expression ID(s) error. > In `RemoveRedundantAliases`, we have an excluded AttributeSet argument > denoting the references for which we should not remove aliases. For a query > with a subquery expression, adding the references of this subquery in the > excluded set prevents such rewrite from happening. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org