You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiao Li (JIRA)" <ji...@apache.org> on 2016/11/11 21:22:58 UTC
[jira] [Updated] (SPARK-18415) Weird Plan Output when CTE used in
RunnableCommand
[ https://issues.apache.org/jira/browse/SPARK-18415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xiao Li updated SPARK-18415:
----------------------------
Description:
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}
was:
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.
the plan output looks weird.
{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}
> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org