Csaba Ringhofer has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/15217


Change subject: IMPALA-8909: Fix incorrectly omitting implicit cast in 
pre-insert sort
......................................................................

IMPALA-8909: Fix incorrectly omitting implicit cast in pre-insert sort

Inserts can add a sort node that orders the rows by partitioning
and Kudu primary key columns (aka. clustered insert). The issue
occurred when the target column was a timestamp and the source
was an expression that returned a string (e.g. concat()). Impala
adds an implicit cast to convert the strings to timestamps before
sorting, but this cast was incorrectly removed later during expression
substitution.

This led to hitting a DCHECK in debug builds and a (not too
informative) error message in release mode.

Note that the cast in question is not visible in EXPLAIN outputs.
Explain should contain implicit casts from explain_level=2 since
https://gerrit.cloudera.org/#/c/11719/ , but it is still not shown
in some expressions. I consider this to be a separate issue.

Testing:
- added an EE test that used to crash
- ran planner / sort / kudu_insert tests

Change-Id: Icca8ab1456a3b840a47833119c9d4fd31a1fff90
---
M fe/src/main/java/org/apache/impala/planner/SortNode.java
M testdata/workloads/functional-query/queries/QueryTest/kudu_insert.test
2 files changed, 18 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/17/15217/1
--
To view, visit http://gerrit.cloudera.org:8080/15217
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icca8ab1456a3b840a47833119c9d4fd31a1fff90
Gerrit-Change-Number: 15217
Gerrit-PatchSet: 1
Gerrit-Owner: Csaba Ringhofer <[email protected]>

Reply via email to