Xin Wu created SPARK-14933: ------------------------------ Summary: 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org