You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xin Wu (JIRA)" <ji...@apache.org> on 2016/04/27 00:34:12 UTC

[jira] [Commented] (SPARK-14933) Failed to create view out of a parquet or orc table

    [ https://issues.apache.org/jira/browse/SPARK-14933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15259084#comment-15259084 ] 

Xin Wu commented on SPARK-14933:
--------------------------------

I have a fix for this and will submit a PR soon.

> Failed to create view out of a parquet or orc table 
> ----------------------------------------------------
>
>                 Key: SPARK-14933
>                 URL: https://issues.apache.org/jira/browse/SPARK-14933
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Xin Wu
>            Priority: Critical
>             Fix For: 2.0.0
>
>
> When I create a table as parquet or orc with following DDL:
> {code}
> create table t1 (c1 int, c2 string) stored as parquet;
> create table t2 (c1 int, c2 string) stored as orc;
> {code}
> Then, do:
> {code}create view v1 as select * from t1;{code}
> The view creation fails because of following error:
> {code}
> Caused by: java.lang.UnsupportedOperationException: unsupported plan Relation[c1#66,c2#67] HadoopFiles
> 	at org.apache.spark.sql.catalyst.SQLBuilder.org$apache$spark$sql$catalyst$SQLBuilder$$toSQL(SQLBuilder.scala:191)
> 	at org.apache.spark.sql.catalyst.SQLBuilder.org$apache$spark$sql$catalyst$SQLBuilder$$toSQL(SQLBuilder.scala:149)
> 	at org.apache.spark.sql.catalyst.SQLBuilder.projectToSQL(SQLBuilder.scala:208)
> 	at org.apache.spark.sql.catalyst.SQLBuilder.org$apache$spark$sql$catalyst$SQLBuilder$$toSQL(SQLBuilder.scala:111)
> 	at org.apache.spark.sql.catalyst.SQLBuilder.org$apache$spark$sql$catalyst$SQLBuilder$$toSQL(SQLBuilder.scala:149)
> 	at org.apache.spark.sql.catalyst.SQLBuilder.projectToSQL(SQLBuilder.scala:208)
> 	at org.apache.spark.sql.catalyst.SQLBuilder.org$apache$spark$sql$catalyst$SQLBuilder$$toSQL(SQLBuilder.scala:111)
> 	at org.apache.spark.sql.catalyst.SQLBuilder.toSQL(SQLBuilder.scala:81)
> 	at org.apache.spark.sql.catalyst.LogicalPlanToSQLSuite.org$apache$spark$sql$catalyst$LogicalPlanToSQLSuite$$checkHiveQl(LogicalPlanToSQLSuite.scala:82)
> 	... 57 more
> {code}
> The error actually happens in the path of converting LogicalPlan to SQL for the LogicalRelation of the HadoopFsRelation (t1)



--
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