[
https://issues.apache.org/jira/browse/CARBONDATA-2864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16582607#comment-16582607
]
anand commented on CARBONDATA-2864:
-----------------------------------
Spark Update working fine with below command with Select:
carbon.sql("UPDATE test_table t SET(t.name)=(SELECT s.NAME FROM test_table s
WHERE s.id=101) WHERE t.id = 10");
But the error while passing the value for update instead of SELECT
Thanks,
Anand C
> Carbon Update not supported in Spark2.x
> ----------------------------------------
>
> Key: CARBONDATA-2864
> URL: https://issues.apache.org/jira/browse/CARBONDATA-2864
> Project: CarbonData
> Issue Type: Bug
> Reporter: anand
> Priority: Major
>
> Carbon update statement was not working in Spark2.x.
>
> Error Log
> carbon.sql("UPDATE test_table t SET(name)='T' where t.id = 10");
> org.apache.spark.sql.AnalysisException: == Parse1 ==
>
> mismatched input 'UPDATE' expecting \{'(', 'SELECT', 'FROM', 'ADD', 'DESC',
> 'WITH', 'VALUES', 'CREATE', 'TABLE', 'INSERT', 'DELETE', 'DESCRIBE',
> 'EXPLAIN', 'SHOW', 'USE', 'DROP', 'ALTER', 'MAP', 'SET', 'RESET', 'START',
> 'COMMIT', 'ROLLBACK', 'REDUCE', 'REFRESH', 'CLEAR', 'CACHE', 'UNCACHE',
> 'DFS', 'TRUNCATE', 'ANALYZE', 'LIST', 'REVOKE', 'GRANT', 'LOCK', 'UNLOCK',
> 'MSCK', 'EXPORT', 'IMPORT', 'LOAD'}(line 1, pos 0)
>
> == SQL ==
> UPDATE test_table t SET(name)='T' where t.id = 10
> ^^^
>
> == Parse2 ==
> Parsing error, missing bracket;
> at
> org.apache.spark.sql.util.CarbonException$.analysisException(CarbonException.scala:23)
> at
> org.apache.spark.sql.parser.CarbonSparkSqlParser.parsePlan(CarbonSparkSqlParser.scala:71)
> at org.apache.spark.sql.CarbonSession.withProfiler(CarbonSession.scala:144)
> at org.apache.spark.sql.CarbonSession.sql(CarbonSession.scala:95)
> ... 50 elided
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)