[
https://issues.apache.org/jira/browse/SPARK-18415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Herman van Hovell resolved SPARK-18415.
---------------------------------------
Resolution: Fixed
Target Version/s: 2.1.0
> Weird Plan Output when CTE used in RunnableCommand
> --------------------------------------------------
>
> Key: SPARK-18415
> URL: https://issues.apache.org/jira/browse/SPARK-18415
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.1.0
> Reporter: Xiao Li
> Assignee: Xiao Li
>
> Currently, when CTE is used in RunnableCommand, the Analyzer does not replace
> the logical node `With`. The child plan of RunnableCommand is not resolved.
> However, the output of the `With` plan node looks very confusing.
> For example,
> {code}
> sql("CREATE VIEW cte_view AS WITH w AS (SELECT 1 AS n) SELECT n FROM
> w").explain()
> {code}
> The output is like
> {code}
> ExecutedCommand
> +- CreateViewCommand `w`, WITH w AS (SELECT 1 AS n) SELECT n FROM w,
> false, false, org.apache.spark.sql.execution.command.PersistedView$@2251b87b
> +- 'With [(w,SubqueryAlias w
> +- Project [1 AS n#16]
> +- OneRowRelation$
> )]
> +- 'Project ['n]
> +- 'UnresolvedRelation `w`
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]