You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Michael Armbrust (JIRA)" <ji...@apache.org> on 2015/09/15 23:22:46 UTC
[jira] [Resolved] (SPARK-5139) select table_alias.* with joins and
selecting column names from inner queries not supported
[ https://issues.apache.org/jira/browse/SPARK-5139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Armbrust resolved SPARK-5139.
-------------------------------------
Resolution: Cannot Reproduce
I believe this is fixed in Spark 1.5. Please reopen if you can still reproduce.
> select table_alias.* with joins and selecting column names from inner queries not supported
> --------------------------------------------------------------------------------------------
>
> Key: SPARK-5139
> URL: https://issues.apache.org/jira/browse/SPARK-5139
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 1.1.1
> Environment: Eclipse + SBT as well as linux cluster
> Reporter: Sunita Koppar
>
> There are 2 issues here:
> 1. "select table_alias.* " on a joined query is not supported
> The exception thrown is as below:
> at scala.sys.package$.error(package.scala:27)
> at org.apache.spark.sql.catalyst.SqlParser.apply(SqlParser.scala:60)
> at org.apache.spark.sql.SQLContext.parseSql(SQLContext.scala:73)
> at org.apache.spark.sql.SQLContext.sql(SQLContext.scala:260)
> at croevss.WfPlsRej$.plsrej(WfPlsRej.scala:80)
> at croevss.WfPlsRej$.main(WfPlsRej.scala:40)
> at croevss.WfPlsRej.main(WfPlsRej.scala)
> 2. Multilevel nesting chokes up with messages like this:
> Exception in thread "main" org.apache.spark.sql.catalyst.errors.package$TreeNodeException: Unresolved attributes:
> Below is a sample query which runs on hive, but fails due to the above reasons with Spark SQL.
> SELECT sq.* ,r.*
> FROM (SELECT cs.*,
> w.primary_key,
> w.id AS s_id1,
> w.d_cd,
> w.d_name,
> w.rd,
> w.completion_date AS completion_date1,
> w.sales_type AS sales_type1
> FROM (SELECT stg.s_id,
> stg.c_id,
> stg.v,
> stg.flg1,
> stg.flg2,
> comstg.d1,
> comstg.d2,
> comstg.d3,
> FROM croe_rej_stage_pq stg
> JOIN croe_rej_stage_comments_pq comstg
> ON ( stg.s_id = comstg.s_id )
> WHERE comstg.valid_flg_txt = 'Y'
> AND stg.valid_flg_txt = 'Y'
> ORDER BY stg.s_id) cs
> JOIN croe_rej_work_pq w
> ON ( cs.s_id = w.s_id )) sq
> JOIN CROE_rdr_pq r
> ON ( sq.d_cd = r.d_number )
> This is very cumbersome to deal with and we end up creating StructTypes for every level.
> If there is a better way to deal with this, please let us know
> regards
> Sunita
--
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