Details
-
Improvement
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
Impala 2.6.0
Description
When inserting rows in Kudu using Impala, an unfriendly error message is reported from Impala when a unique key constraint is violated. We need to improve this.
impala-shell> insert into t1 values (1,1); WARNINGS: Error while flushing Kudu session: Already present: entry already present in memrowset Error while flushing Kudu session: Already present: entry already present in memrowset
Another issue is during insert select statements when some inserted rows violate the unique key constraints:
impala-shell> create table t1 (a int, b int) ... <--- kudu table impala-shell> insert into t1 values(1,1); impala-shell> insert into t1 select cast(a + 100 as int), b from t1; <-- works well impala-shell> insert into t1 select cast(a + 100 as int), b from t1;
The last statement reports an error, indicating that the insert failed. However, if we run a select on t1 we can see that some rows were successfully inserted. We should improve the error message and always report the number of inserted rows.