Thomas Tauber-Marshall has uploaded a new change for review. http://gerrit.cloudera.org:8080/7922
Change subject: IMPALA-5871: KuduPartitionExpr incorrectly handles its child types ...................................................................... IMPALA-5871: KuduPartitionExpr incorrectly handles its child types KuduPartitionExpr takes input rows and sends them to Kudu to determine the partition the rows correspond to in a particular table's partitioning scheme. This is then used to partition and sort rows before sending them to Kudu when performing an INSERT. If the input types are not the same as (but are compatible with) the types of the columns in the table, we need to cast the input rows. KuduPartitionExpr.analyze() actually already does this, but the casts are dropped for the sort step during the INSERT in most cases. As a result, attempting to insert a string value into a Kudu timestamp column causes a crash. Inserting a numeric value into a different but compatibly types col (eg. tinyint into an int col) will cause the sort during a Kudu INSERT to operate on garbage values, potentially degrading performance and causing INSERTs to fail due to Kudu timeouts (see IMPALA-3742). Testing: - Added an e2e test in kudu_insert.test Change-Id: I44cf31e46a77f3e7c92cf6b9112653808a001705 --- M be/src/exprs/kudu-partition-expr.cc M fe/src/main/java/org/apache/impala/analysis/KuduPartitionExpr.java M testdata/workloads/functional-query/queries/QueryTest/kudu_insert.test 3 files changed, 23 insertions(+), 9 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/22/7922/1 -- To view, visit http://gerrit.cloudera.org:8080/7922 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I44cf31e46a77f3e7c92cf6b9112653808a001705 Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Thomas Tauber-Marshall <[email protected]>
