PURUJIT CHAUGULE created CARBONDATA-4134:
--------------------------------------------
Summary: MERGE INTO SQL Command is successful with wrong input for action
Key: CARBONDATA-4134
URL:
https://issues.apache.org/jira/browse/CARBONDATA-4134 Project: CarbonData
Issue Type: Bug
Components: data-query
Affects Versions: 2.1.0
Environment: Spark 2.4.5
Reporter: PURUJIT CHAUGULE
STEPS:
DROP TABLE IF EXISTS A;
DROP TABLE IF EXISTS B;
CREATE TABLE IF NOT EXISTS A(id Int,price Int, state String) STORED AS carbondata;
CREATE TABLE IF NOT EXISTS B(id Int, price Int,state String ) STORED AS carbondata;
INSERT INTO A VALUES (1,100,"MA");
INSERT INTO A VALUES (2,200,"NY");
INSERT INTO A VALUES (3,300,"NH");
INSERT INTO A VALUES (4,400,"FL");
INSERT INTO B VALUES (1,1,"MA (updated)");
INSERT INTO B VALUES (2,3,"NY (updated)");
INSERT INTO B VALUES (3,3,"CA (updated)");
INSERT INTO B VALUES (5,5,"TX (updated)");
INSERT INTO B VALUES (7,7,"LO (updated)");
0: jdbc:hive2://linux1:22550/> MERGE INTO A USING B ON A.ID=B.ID WHEN NOT MATCHED THEN;
+---------+
| Result |
+---------+
+---------+
No rows selected (16.256 seconds)
0: jdbc:hive2://linux1:22550/>
0: jdbc:hive2://linux1:22550/> MERGE INTO A USING B ON A.ID=B.ID WHEN NOT MATCHED THEN X;
+---------+
| Result |
+---------+
+---------+
No rows selected (5.565 seconds)
0: jdbc:hive2://linux1:22550/>
0: jdbc:hive2://linux1:22550/> MERGE INTO A USING B ON A.ID=B.ID WHEN MATCHED THEN a.b;
+---------+
| Result |
+---------+
+---------+
No rows selected (39.731 seconds)
0: jdbc:hive2://linux1:22550/>
0: jdbc:hive2://linux1:22550/> MERGE INTO A USING B ON A.ID=B.ID WHEN MATCHED THEN 1;
+---------+
| Result |
+---------+
+---------+
No rows selected (14.754 seconds)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)