dilipbiswal commented on issue #24759: [SPARK-27395][SQL][WIP] Improve EXPLAIN command URL: https://github.com/apache/spark/pull/24759#issuecomment-517603962 @cloud-fan > the *(1) prefix is pretty short. Shall we keep this in the head portion? It can give you a general sense about how is your query being whole-stage-codegened. If you worry about the codegen id may conflict with the operator id, we can omit it and only use * as the prefix > it's a good idea to separate uncorrelated subqueries from the main query, but how about correlated subqueries? Can you give an example? I modified locally to include the '*' for wholestage codegen and here is the plan for a simple correlated subquery. ``` explain select * from s1 where exists (select c from s2 where s1.a = s2.d); ``` ``` == Physical Plan == SortMergeJoin LeftSemi (7) :- *Sort (3) : +- Exchange (2) : +- Scan hive default.s1 (1) +- *Sort (6) +- Exchange (5) +- Scan hive default.s2 (4) (1) Scan hive default.s1 Output: [a#35, b#36] (2) Exchange Input: [a#35, b#36] (3) Sort [codegen id : 1] Input: [a#35, b#36] (4) Scan hive default.s2 Output: [d#38] (5) Exchange Input: [d#38] (6) Sort [codegen id : 2] Input: [d#38] (7) SortMergeJoin Left keys : List(a#35) Right keys: List(d#38) Join condition : None ```
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
