Simeon Simeonov created SPARK-9342:
--------------------------------------

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


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]



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

Reply via email to