Chetan Bhat created CARBONDATA-4128:
--------------------------------------- Summary: Merge SQL command fails with different case for column name Key: CARBONDATA-4128 URL: https://issues.apache.org/jira/browse/CARBONDATA-4128 Project: CarbonData Issue Type: Bug Components: data-query Affects Versions: 2.1.0 Environment: Spark 2.4.5 Reporter: Chetan Bhat Steps:- drop table if exists A; drop table if exists B; CREATE TABLE A(id Int, name string, description string,address string, note string) stored as carbondata tblproperties('long_string_columns'='description,note','table_blocksize'='1','SORT_SCOPE'='global_sort','table_page_size_inmb'='1'); insert into A select 1,"name11111","asasfdfdfdsf","tutyutyuty","6867898980909099-0-0-0878676565454545465768798"; insert into A select 2,"name11112","asasfdfdfdsf","tutyutyuty","6867898980909099-0-0-0878676565454545465768798"; insert into A select 3,"name11113","asasfdfdfdsf","tutyutyuty","6867898980909099-0-0-0878676565454545465768798"; insert into A select 4,"name11114","asasfdfdfdsf","tutyutyuty","6867898980909099-0-0-0878676565454545465768798"; insert into A select 5,"name11115","asasfdfdfdsf","tutyutyuty","6867898980909099-0-0-0878676565454545465768798"; CREATE TABLE B(id Int, name string, description string,address string, note string) stored as carbondata tblproperties('long_string_columns'='description,note','table_blocksize'='1','SORT_SCOPE'='global_sort','table_page_size_inmb'='1'); insert into B select 1,"name11111","asasfdfdfdsf","tutyutyuty","6867898980909099-0-0-0878676565454545465768798"; insert into B select 2,"name11112","asasfdfdfdsf","tutyutyuty","6867898980909099-0-0-0878676565454545465768798"; insert into B select 3,"name11113","asasfdfdfdsf","tutyutyuty","6867898980909099-0-0-0878676565454545465768798"; insert into B select 6,"name11114","asasfdfdfdsf","tutyutyuty","6867898980909099-0-0-0878676565454545465768798"; insert into B select 7,"name11115","asasfdfdfdsf","tutyutyuty","6867898980909099-0-0-0878676565454545465768798"; --merge MERGE INTO A USING B ON A.id=B.id WHEN MATCHED THEN DELETE; Issue :- Merge SQL command fails with different case for column name 0: jdbc:hive2://linux-63:22550/> MERGE INTO A USING B ON A.id=B.id WHEN MATCHED THEN DELETE; Error: org.apache.spark.sql.AnalysisException: == Spark Parser: org.apache.spark.sql.hive.FISqlParser == mismatched input 'MERGE' expecting \{'(', 'SELECT', 'FROM', 'ADD', 'DESC', 'EMPOWER', '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', 'HEALTHCHECK'}(line 1, pos 0) == SQL == MERGE INTO A USING B ON A.id=B.id WHEN MATCHED THEN DELETE ^^^ == Carbon Parser: org.apache.spark.sql.parser.CarbonExtensionSpark2SqlParser == [1.1] failure: identifier matching regex (?i)EXPLAIN expected MERGE INTO A USING B ON A.id=B.id WHEN MATCHED THEN DELETE ^; == Antlr Parser: org.apache.spark.sql.parser.CarbonAntlrParser == org.apache.spark.sql.parser.CarbonSqlBaseParser$ValueExpressionDefaultContext cannot be cast to org.apache.spark.sql.parser.CarbonSqlBaseParser$ComparisonContext; (state=,code=0) 0: jdbc:hive2://linux-63:22550/> -- This message was sent by Atlassian Jira (v8.3.4#803005) |
Free forum by Nabble | Edit this page |