Github user gatorsmile commented on the pull request: https://github.com/apache/spark/pull/9385#issuecomment-155605985 @marmbrus After rechecking the root reason why Expand failed, I still think we should cleanup the subquery name after subquery elimination. My current fix needs a change to enable a deeper clean of subquery. Let me explain what happened in Expand. Before subquery elimination, the subquery name "mytable" is shown in all the three upper levels (Aggregate, Expand and Project). ```scala Aggregate [(a#2 + b#3)#7,b#3,grouping__id#6], [(a#2 + b#3)#7 AS _c0#4,b#3,sum(cast((a#2 - b#3) as bigint)) AS _c2#5L] Expand [0,1,3], [(a#2 + b#3)#7,b#3], grouping__id#6 Project [a#2,b#3,(a#2 + b#3) AS (a#2 + b#3)#7] Subquery mytable Project [_1#0 AS a#2,_2#1 AS b#3] LocalRelation [_1#0,_2#1], [[1,2],[2,4]] ``` After subquery elimination, the subquery name "mytable" is not removed in these three levels.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org