You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "Zhichao Zhang (JIRA)" <ji...@apache.org> on 2019/07/26 06:53:00 UTC
[jira] [Updated] (CARBONDATA-3477) Throw out exception when use
sql: 'update table select\n...'
[ https://issues.apache.org/jira/browse/CARBONDATA-3477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zhichao Zhang updated CARBONDATA-3477:
---------------------------------------
Description:
When use below sql to update table:
{code:java}
UPDATE IUD_table2 a
SET (a.IUD_table2_country, a.IUD_table2_salary) = (select
b.IUD_table1_country, b.IUD_table1_salary from IUD_table1 b where b.IUD_table1_id = 8)
WHERE a.IUD_table2_id < 6 or a.IUD_table2_id > 15{code}
*It will throw out exception:*
{code:java}
Exception in thread "main" org.apache.spark.sql.AnalysisException: == Parse1 ==
mismatched input '.' expecting <EOF>(line 2, pos 1)
== SQL ==
select select
b.IUD_table1_country, b.IUD_table1_salary from IUD_table1 b where b.IUD_table1_id = 8 from iud_table2 a
-^^^
== Parse2 ==
[1.1] failure: identifier matching regex (?i)ALTER expected
select select
{code}
was:
When use below sql to update table:
UPDATE IUD_table2 a
SET (a.IUD_table2_country, a.IUD_table2_salary) = (select
b.IUD_table1_country, b.IUD_table1_salary from IUD_table1 b where b.IUD_table1_id = 8)
WHERE a.IUD_table2_id < 6 or a.IUD_table2_id > 15
It will throw out exception:
Exception in thread "main" org.apache.spark.sql.AnalysisException: == Parse1 ==
mismatched input '.' expecting <EOF>(line 2, pos 1)
== SQL ==
select select
b.IUD_table1_country, b.IUD_table1_salary from IUD_table1 b where b.IUD_table1_id = 8 from iud_table2 a
-^^^
== Parse2 ==
[1.1] failure: identifier matching regex (?i)ALTER expected
select select
> Throw out exception when use sql: 'update table select\n...'
> ------------------------------------------------------------
>
> Key: CARBONDATA-3477
> URL: https://issues.apache.org/jira/browse/CARBONDATA-3477
> Project: CarbonData
> Issue Type: Bug
> Reporter: Zhichao Zhang
> Assignee: Zhichao Zhang
> Priority: Minor
>
> When use below sql to update table:
> {code:java}
> UPDATE IUD_table2 a
> SET (a.IUD_table2_country, a.IUD_table2_salary) = (select
> b.IUD_table1_country, b.IUD_table1_salary from IUD_table1 b where b.IUD_table1_id = 8)
> WHERE a.IUD_table2_id < 6 or a.IUD_table2_id > 15{code}
> *It will throw out exception:*
>
> {code:java}
> Exception in thread "main" org.apache.spark.sql.AnalysisException: == Parse1 ==
> mismatched input '.' expecting <EOF>(line 2, pos 1)
> == SQL ==
> select select
> b.IUD_table1_country, b.IUD_table1_salary from IUD_table1 b where b.IUD_table1_id = 8 from iud_table2 a
> -^^^
> == Parse2 ==
> [1.1] failure: identifier matching regex (?i)ALTER expected
> select select
> {code}
>
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)