You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Reynold Xin (JIRA)" <ji...@apache.org> on 2016/12/15 00:15:59 UTC
[jira] [Resolved] (SPARK-18854) getNodeNumbered and
generateTreeString are not consistent
[ https://issues.apache.org/jira/browse/SPARK-18854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Reynold Xin resolved SPARK-18854.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.1.0
2.0.3
Target Version/s: 2.0.3, 2.1.0 (was: 2.0.3, 2.1.1, 2.2.0)
> getNodeNumbered and generateTreeString are not consistent
> ---------------------------------------------------------
>
> Key: SPARK-18854
> URL: https://issues.apache.org/jira/browse/SPARK-18854
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Reporter: Reynold Xin
> Fix For: 2.0.3, 2.1.0
>
>
> This is a bug introduced by subquery handling. generateTreeString numbers trees including innerChildren (used to print subqueries), but getNodeNumbered ignores that. As a result, getNodeNumbered is not always correct.
> Repro:
> {code}
> val df = sql("select * from range(10) where id not in " +
> "(select id from range(2) union all select id from range(2))")
> println("-------------------------------------------------------")
> println(df.queryExecution.analyzed.numberedTreeString)
> println("-------------------------------------------------------")
> println("-------------------------------------------------------")
> println(df.queryExecution.analyzed(3))
> println("-------------------------------------------------------")
> {code}
> Output looks like
> {noformat}
> -------------------------------------------------------
> 00 Project [id#1L]
> 01 +- Filter NOT predicate-subquery#0 [(id#1L = id#2L)]
> 02 : +- Union
> 03 : :- Project [id#2L]
> 04 : : +- Range (0, 2, step=1, splits=None)
> 05 : +- Project [id#3L]
> 06 : +- Range (0, 2, step=1, splits=None)
> 07 +- Range (0, 10, step=1, splits=None)
> -------------------------------------------------------
> -------------------------------------------------------
> null
> -------------------------------------------------------
> {noformat}
> Note that 3 should be the Project node, but getNodeNumbered ignores innerChild and as a result returns the wrong one.
--
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