You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "Geetika Gupta (JIRA)" <ji...@apache.org> on 2018/01/08 10:46:00 UTC
[jira] [Created] (CARBONDATA-2005) Location attribute with table
properties in create table command throws parser exception
Geetika Gupta created CARBONDATA-2005:
-----------------------------------------
Summary: Location attribute with table properties in create table command throws parser exception
Key: CARBONDATA-2005
URL: https://issues.apache.org/jira/browse/CARBONDATA-2005
Project: CarbonData
Issue Type: Bug
Components: data-query
Affects Versions: 1.3.0
Environment: spark2.1
Reporter: Geetika Gupta
Fix For: 1.3.0
I created a table using:
import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.CarbonSession._
import org.apache.carbondata.core.util.CarbonProperties
import org.apache.spark.sql.streaming.{ProcessingTime, StreamingQuery}
val carbon = SparkSession.builder().config(sc.getConf) .getOrCreateCarbonSession("hdfs://localhost:54311/newCarbonStore","/tmp")
carbon.sql("create table jan8(id int, name string) stored by 'carbondata' tblproperties('streaming'='true') location '/home/geetika'").show
It show the following exception:
scala> carbon.sql("create table jan8(id int, name string) stored by 'carbondata' tblproperties('streaming'='true') location '/home/geetika'").show
org.apache.spark.sql.AnalysisException: == Parse1 ==
mismatched input 'location' expecting <EOF>(line 1, pos 96)
== SQL ==
create table jan8(id int, name string) stored by 'carbondata' tblproperties('streaming'='true') location '/home/geetika'
------------------------------------------------------------------------------------------------^^^
== Parse2 ==
[1.8] failure: identifier matching regex (?i)DATAMAP expected
create table jan8(id int, name string) stored by 'carbondata' tblproperties('streaming'='true') location '/home/geetika'
^;;
at org.apache.spark.sql.util.CarbonException$.analysisException(CarbonException.scala:23)
at org.apache.spark.sql.parser.CarbonSparkSqlParser.parsePlan(CarbonSparkSqlParser.scala:64)
at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:592)
... 50 elided
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)