Maybe try enabling the following (false by default): "spark.sql.hive.convertCTAS"
doc = "When true, a table created by a Hive CTAS statement (no USING clause) will be " + "converted to a data source table, using the data source set by spark.sql.sources.default.") FYI On Tue, Jan 26, 2016 at 8:06 AM, Younes Naguib < [email protected]> wrote: > SQL on beeline and connecting to the thriftserver. > > > > Younes > > > > *From:* Ted Yu [mailto:[email protected]] > *Sent:* January-26-16 11:05 AM > *To:* Younes Naguib > *Cc:* [email protected] > *Subject:* Re: ctas fails with "No plan for CreateTableAsSelect" > > > > Were you using HiveContext or SQLContext ? > > > > Can you show the complete stack trace ? > > > > Thanks > > > > On Tue, Jan 26, 2016 at 8:00 AM, Younes Naguib < > [email protected]> wrote: > > Hi, > > > > I’m running CTAS, and it fails with “Error: java.lang.AssertionError: > assertion failed: No plan for CreateTableAsSelect HiveTable....” > > Here what my sql looks like : > > Create tbl ( > > Col1 timestamp , > > Col2 string, > > Col3 int, > > ..... > > ) > > partitioned by (year int, month int, day int) > > stored as parquet > > location 'hdfs://... > > as select..... > > ; > > > > The select by itself works. > > > > I’m running spark 1.6. > > > > > > *Younes* > > > > >
