You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org> on 2020/02/13 18:24:08 UTC

[Impala-ASF-CR] IMPALA-8909: Fix incorrectly omitting implicit cast in pre-insert sort

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 <cs...@cloudera.com>

[Impala-ASF-CR] IMPALA-8909: Fix incorrectly omitting implicit cast in pre-insert sort

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change. ( http://gerrit.cloudera.org:8080/15217 )

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


Patch Set 1: Code-Review+2

I think this is the right fix - it should ensure that the root type of the exprs doesn't get changed.

There are some broader challenges with the whole implicit cast concept.


-- 
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: comment
Gerrit-Change-Id: Icca8ab1456a3b840a47833119c9d4fd31a1fff90
Gerrit-Change-Number: 15217
Gerrit-PatchSet: 1
Gerrit-Owner: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 13 Feb 2020 18:40:20 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-8909: Fix incorrectly omitting implicit cast in pre-insert sort

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/15217 )

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


Patch Set 2: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/5339/


-- 
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: comment
Gerrit-Change-Id: Icca8ab1456a3b840a47833119c9d4fd31a1fff90
Gerrit-Change-Number: 15217
Gerrit-PatchSet: 2
Gerrit-Owner: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Fri, 14 Feb 2020 13:55:38 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-8909: Fix incorrectly omitting implicit cast in pre-insert sort

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/15217 )

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


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/5217/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
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: comment
Gerrit-Change-Id: Icca8ab1456a3b840a47833119c9d4fd31a1fff90
Gerrit-Change-Number: 15217
Gerrit-PatchSet: 1
Gerrit-Owner: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 13 Feb 2020 19:10:32 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-8909: Fix incorrectly omitting implicit cast in pre-insert sort

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/15217 )

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


Patch Set 2: Code-Review+2


-- 
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: comment
Gerrit-Change-Id: Icca8ab1456a3b840a47833119c9d4fd31a1fff90
Gerrit-Change-Number: 15217
Gerrit-PatchSet: 2
Gerrit-Owner: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Fri, 14 Feb 2020 08:57:08 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-8909: Fix incorrectly omitting implicit cast in pre-insert sort

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( 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
Reviewed-on: http://gerrit.cloudera.org:8080/15217
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
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(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

-- 
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: merged
Gerrit-Change-Id: Icca8ab1456a3b840a47833119c9d4fd31a1fff90
Gerrit-Change-Number: 15217
Gerrit-PatchSet: 4
Gerrit-Owner: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>

[Impala-ASF-CR] IMPALA-8909: Fix incorrectly omitting implicit cast in pre-insert sort

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/15217 )

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


Patch Set 3:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/5349/ DRY_RUN=false


-- 
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: comment
Gerrit-Change-Id: Icca8ab1456a3b840a47833119c9d4fd31a1fff90
Gerrit-Change-Number: 15217
Gerrit-PatchSet: 3
Gerrit-Owner: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Mon, 17 Feb 2020 16:57:48 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-8909: Fix incorrectly omitting implicit cast in pre-insert sort

Posted by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org>.
Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/15217 )

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


Patch Set 2:

The errors seem unrelated.
IMPALA-9372 occurred in both builds + we couldn't wget maven from the apache site in rat check (first build) and in clang tidy (second build)


-- 
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: comment
Gerrit-Change-Id: Icca8ab1456a3b840a47833119c9d4fd31a1fff90
Gerrit-Change-Number: 15217
Gerrit-PatchSet: 2
Gerrit-Owner: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Fri, 14 Feb 2020 15:56:53 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-8909: Fix incorrectly omitting implicit cast in pre-insert sort

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/15217 )

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


Patch Set 2:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/5339/ DRY_RUN=false


-- 
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: comment
Gerrit-Change-Id: Icca8ab1456a3b840a47833119c9d4fd31a1fff90
Gerrit-Change-Number: 15217
Gerrit-PatchSet: 2
Gerrit-Owner: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Fri, 14 Feb 2020 08:57:09 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-8909: Fix incorrectly omitting implicit cast in pre-insert sort

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/15217 )

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


Patch Set 3: Verified+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: comment
Gerrit-Change-Id: Icca8ab1456a3b840a47833119c9d4fd31a1fff90
Gerrit-Change-Number: 15217
Gerrit-PatchSet: 3
Gerrit-Owner: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Mon, 17 Feb 2020 21:20:25 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-8909: Fix incorrectly omitting implicit cast in pre-insert sort

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/15217 )

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


Patch Set 1: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/5334/


-- 
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: comment
Gerrit-Change-Id: Icca8ab1456a3b840a47833119c9d4fd31a1fff90
Gerrit-Change-Number: 15217
Gerrit-PatchSet: 1
Gerrit-Owner: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 13 Feb 2020 23:29:51 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-8909: Fix incorrectly omitting implicit cast in pre-insert sort

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/15217 )

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


Patch Set 1:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/5334/ DRY_RUN=true


-- 
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: comment
Gerrit-Change-Id: Icca8ab1456a3b840a47833119c9d4fd31a1fff90
Gerrit-Change-Number: 15217
Gerrit-PatchSet: 1
Gerrit-Owner: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Thu, 13 Feb 2020 18:29:18 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-8909: Fix incorrectly omitting implicit cast in pre-insert sort

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/15217 )

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


Patch Set 3: Code-Review+2


-- 
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: comment
Gerrit-Change-Id: Icca8ab1456a3b840a47833119c9d4fd31a1fff90
Gerrit-Change-Number: 15217
Gerrit-PatchSet: 3
Gerrit-Owner: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Mon, 17 Feb 2020 16:57:47 +0000
Gerrit-HasComments: No