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/07/07 07:08:11 UTC
[jira] [Resolved] (SPARK-16368) Strange Errors When Creating View
With Unmatched Column Num
[ https://issues.apache.org/jira/browse/SPARK-16368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Reynold Xin resolved SPARK-16368.
---------------------------------
Resolution: Fixed
Assignee: Xiao Li
Fix Version/s: 2.0.0
> Strange Errors When Creating View With Unmatched Column Num
> -----------------------------------------------------------
>
> Key: SPARK-16368
> URL: https://issues.apache.org/jira/browse/SPARK-16368
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.0.0
> Reporter: Xiao Li
> Assignee: Xiao Li
> Fix For: 2.0.0
>
>
> When creating a view, a common user error is the number of columns produced by the SELECT clause does not match the number of column names specified by CREATE VIEW.
> For example, given Table {{t1}} only has 3 columns
> {noformat}
> create view v1(col2, col4, col3, col5) as select * from t1
> {noformat}
> Currently, Spark SQL reports the following error:
> {noformat}
> requirement failed
> java.lang.IllegalArgumentException: requirement failed
> at scala.Predef$.require(Predef.scala:212)
> at org.apache.spark.sql.execution.command.CreateViewCommand.run(views.scala:90)
> {noformat}
> This error is very confusing.
--
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