[jira] [Updated] (CARBONDATA-2005) Location attribute with table properties in create table command throws parser exception

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (CARBONDATA-2005) Location attribute with table properties in create table command throws parser exception

Akash R Nilugal (Jira)

     [ https://issues.apache.org/jira/browse/CARBONDATA-2005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Geetika Gupta updated CARBONDATA-2005:
--------------------------------------
    Priority: Minor  (was: Major)

> 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
>            Priority: Minor
>             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)