You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Simeon Simeonov (JIRA)" <ji...@apache.org> on 2015/07/25 17:09:04 UTC
[jira] [Updated] (SPARK-9342) Spark SQL views don't work
[ https://issues.apache.org/jira/browse/SPARK-9342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simeon Simeonov updated SPARK-9342:
-----------------------------------
Description:
The Spark SQL documentation's section on Hive support claims that views are supported. However, even basic view operations fail with exceptions related to column resolution.
For example,
{code}
// The test table has columns category & num
ctx.sql("create view view1 as select * from test")
ctx.table("view1").printSchema
{code}
generates
{code}
org.apache.spark.sql.AnalysisException: cannot resolve 'test.col' given input columns category, num; line 1 pos 7
at org.apache.spark.sql.catalyst.analysis.package$AnalysisErrorAt.failAnalysis(package.scala:42)
...
{code}
You can see a standalone reproducible example with full spark-shell output demonstrating the problem at [https://gist.github.com/ssimeonov/57164f9d6b928ba0cfde]
was:
The Spark SQL documentation's section on Hive support claims that views are supported. However, even basic view operations fail with exceptions related to column resolution.
For example,
{code}
ctx.sql("create view view1 as select * from test")
ctx.table("view1").printSchema
{code}
generates
{code}
org.apache.spark.sql.AnalysisException: cannot resolve 'test.col' given input columns category, num; line 1 pos 7
at org.apache.spark.sql.catalyst.analysis.package$AnalysisErrorAt.failAnalysis(package.scala:42)
...
{code}
You can see a standalone reproducible example with full spark-shell output demonstrating the problem at [https://gist.github.com/ssimeonov/57164f9d6b928ba0cfde]
> Spark SQL views don't work
> --------------------------
>
> Key: SPARK-9342
> URL: https://issues.apache.org/jira/browse/SPARK-9342
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 1.3.1
> Environment: Ubuntu on AWS
> Reporter: Simeon Simeonov
> Labels: sql, views
>
> The Spark SQL documentation's section on Hive support claims that views are supported. However, even basic view operations fail with exceptions related to column resolution.
> For example,
> {code}
> // The test table has columns category & num
> ctx.sql("create view view1 as select * from test")
> ctx.table("view1").printSchema
> {code}
> generates
> {code}
> org.apache.spark.sql.AnalysisException: cannot resolve 'test.col' given input columns category, num; line 1 pos 7
> at org.apache.spark.sql.catalyst.analysis.package$AnalysisErrorAt.failAnalysis(package.scala:42)
> ...
> {code}
> You can see a standalone reproducible example with full spark-shell output demonstrating the problem at [https://gist.github.com/ssimeonov/57164f9d6b928ba0cfde]
--
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