[
https://issues.apache.org/jira/browse/SPARK-23021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16323672#comment-16323672
]
Kris Mok commented on SPARK-23021:
----------------------------------
Hi [~maropu]-san,
Thanks! I'm not familiar with this part of the code, but IIUC there's two
points to this:
1. The explain output shouldn't be changed because of the newly added
{{AnalysisBarrier}}. The current behavior (with the cutoff) should be
considered a regression, although it's not a major behavioral one.
2. The reason why {{AnalysisBarrier}} didn't override {{innerChildren}} was by
design: it wanted to cut off the recursion to help avoid stack overflows when
the analyzer needs to walk the plan tree.
[~cloud_fan] may have recently fixed a similar issue where the "analyzed
logical plan" was cut off by {{AnalysisBarrier}} in the same way. Is that the
case, [~cloud_fan]?
> AnalysisBarrier should not cut off the explain output for Parsed Logical Plan
> -----------------------------------------------------------------------------
>
> Key: SPARK-23021
> URL: https://issues.apache.org/jira/browse/SPARK-23021
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.3.0
> Reporter: Kris Mok
>
> In PR#20094 as a follow up to SPARK-20392, there were some fixes to the
> handling of {{AnalysisBarrier}}, but there seem to be more cases that need to
> be fixed.
> One such case is that right now the Parsed Logical Plan in explain output
> would be cutoff by {{AnalysisBarrier}}, e.g.
> {code:none}
> scala> val df1 = spark.range(1).select('id as 'x, 'id + 1 as
> 'y).repartition(1).select('x === 'y)
> df1: org.apache.spark.sql.DataFrame = [(x = y): boolean]
> scala> df1.explain(true)
> == Parsed Logical Plan ==
> 'Project [('x = 'y) AS (x = y)#22]
> +- AnalysisBarrier Repartition 1, true
> == Analyzed Logical Plan ==
> (x = y): boolean
> Project [(x#16L = y#17L) AS (x = y)#22]
> +- Repartition 1, true
> +- Project [id#13L AS x#16L, (id#13L + cast(1 as bigint)) AS y#17L]
> +- Range (0, 1, step=1, splits=Some(8))
> == Optimized Logical Plan ==
> Project [(x#16L = y#17L) AS (x = y)#22]
> +- Repartition 1, true
> +- Project [id#13L AS x#16L, (id#13L + 1) AS y#17L]
> +- Range (0, 1, step=1, splits=Some(8))
> == Physical Plan ==
> *Project [(x#16L = y#17L) AS (x = y)#22]
> +- Exchange RoundRobinPartitioning(1)
> +- *Project [id#13L AS x#16L, (id#13L + 1) AS y#17L]
> +- *Range (0, 1, step=1, splits=8)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]