You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Tianyi Wang (Code Review)" <ge...@cloudera.org> on 2017/09/02 00:15:55 UTC

[Impala-ASF-CR] IMPALA-5597: Check predicate children types when building runtime filter plan

Tianyi Wang has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/7949

Change subject: IMPALA-5597: Check predicate children types when building runtime filter plan
......................................................................

IMPALA-5597: Check predicate children types when building runtime filter plan

This patch fixes a bug that fails a precondition check when generating
runtime filter plans. The lhs and rhs of predicate to be joined on may
have different types when the eq predicate function accepts
wildcard-typed parameters. Then in existing code the types of source
and target expr will be found mismatch and an exception will be thrown.
With this patch such runtime filters are abandoned.
A testcase is added to joins.test

Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
---
M fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java
M testdata/workloads/functional-query/queries/QueryTest/joins.test
2 files changed, 9 insertions(+), 0 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>

[Impala-ASF-CR] IMPALA-5597: Check predicate children types when building runtime filter plan

Posted by "Tianyi Wang (Code Review)" <ge...@cloudera.org>.
Tianyi Wang has restored this change.

Change subject: IMPALA-5597: Check predicate children types when building runtime filter plan
......................................................................


Restored

A new fix is implemented.

-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: restore
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>

[Impala-ASF-CR] IMPALA-5597: Try casting targetExpr when building runtime filter plan

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change.

Change subject: IMPALA-5597: Try casting targetExpr when building runtime filter plan
......................................................................


Patch Set 4:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/1217/

-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5597: Check predicate children types when building runtime filter plan

Posted by "Tianyi Wang (Code Review)" <ge...@cloudera.org>.
Tianyi Wang has posted comments on this change.

Change subject: IMPALA-5597: Check predicate children types when building runtime filter plan
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7949/1//COMMIT_MSG
Commit Message:

Line 14: With this patch such runtime filters are abandoned.
> Do they have to be abandoned? We we make them work instead?
I have some options posted on JIRA and I need some input to do this.


-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-5597: Try casting targetExpr when building runtime filter plan

Posted by "Tianyi Wang (Code Review)" <ge...@cloudera.org>.
Tianyi Wang has posted comments on this change.

Change subject: IMPALA-5597: Try casting targetExpr when building runtime filter plan
......................................................................


Patch Set 3:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/7949/3/fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java
File fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java:

Line 587:       } catch (IllegalStateException e) {
> catch (Exception e)
Done


Line 592:     // Types of targetExpr and srcExpr should be exactly the same since runtime filter is
> Types of targetExpr and srcExpr must be exactly the same since runtime filt
Done


Line 597:       } catch (AnalysisException | IllegalArgumentException e) {
> catch (Exception e)
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-5597: Check predicate children types when building runtime filter plan

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-5597: Check predicate children types when building runtime filter plan
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/7949/1/fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java
File fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java:

Line 240:       if (!targetExpr.getType().matchesType(srcExpr.getType())) return null;
We can still fix this case, see my comments below.


Line 585:         targetExpr = targetExpr.substitute(smap, analyzer, true);
Looks like the existing code is trying to do the right thing, but it's not quite correct. Since our runtime filters are hash based (bloom) the source and target exprs must have *identical* types, otherwise the same values may hash differently.

Proposed changes:
1. Pass 'false' to this substitute() to not preserve the type.
2. Try to cast the resulting targetExpr to filter.getSrcExpr().getType(). If that fails, we have to bail like in the existing catch block here.
3. The Preconditions check in L597 is too weak. We require the types to be identical (use equals()).


-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-5597: Try casting targetExpr when building runtime filter plan

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-5597: Try casting targetExpr when building runtime filter plan
......................................................................


Patch Set 3:

(4 comments)

lgtm after this round

http://gerrit.cloudera.org:8080/#/c/7949/3/fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java
File fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java:

Line 587:       } catch (IllegalStateException e) {
catch (Exception e)


Line 592:     // Types of targetExpr and srcExpr should be exactly the same since runtime filter is
Types of targetExpr and srcExpr must be exactly the same since runtime filters are based on hashing.


Line 597:       } catch (AnalysisException | IllegalArgumentException e) {
catch (Exception e)


http://gerrit.cloudera.org:8080/#/c/7949/2/testdata/workloads/functional-query/queries/QueryTest/joins.test
File testdata/workloads/functional-query/queries/QueryTest/joins.test:

Line 774
> Done. What does propagation mean here?
I agree "propagation" may be confusing. I think it refers to the fact we are "sprinkling" runtime filters throughout the plan tree. I think it's more confusing than not (might be better to rename in a separate patch).


-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-5597: Check predicate children types when building runtime filter plan

Posted by "Tianyi Wang (Code Review)" <ge...@cloudera.org>.
Tianyi Wang has restored this change.

Change subject: IMPALA-5597: Check predicate children types when building runtime filter plan
......................................................................


Restored

Reopen since a new fix is implemented.

-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: restore
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>

[Impala-ASF-CR] IMPALA-5597: Check predicate children types when building runtime filter plan

Posted by "Tianyi Wang (Code Review)" <ge...@cloudera.org>.
Tianyi Wang has abandoned this change.

Change subject: IMPALA-5597: Check predicate children types when building runtime filter plan
......................................................................


Abandoned

Need to rewrite this patch completely.

-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>

[Impala-ASF-CR] IMPALA-5597: Check predicate children types when building runtime filter plan

Posted by "Tianyi Wang (Code Review)" <ge...@cloudera.org>.
Tianyi Wang has abandoned this change.

Change subject: IMPALA-5597: Check predicate children types when building runtime filter plan
......................................................................


Abandoned

Sorry. Not ready.

-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>

[Impala-ASF-CR] IMPALA-5597: Try casting targetExpr when building runtime filter plan

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-5597: Try casting targetExpr when building runtime filter plan
......................................................................


Patch Set 4: Code-Review+2

-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5597: Try casting targetExpr when building runtime filter plan

Posted by "Tianyi Wang (Code Review)" <ge...@cloudera.org>.
Tianyi Wang has uploaded a new patch set (#4).

Change subject: IMPALA-5597: Try casting targetExpr when building runtime filter plan
......................................................................

IMPALA-5597: Try casting targetExpr when building runtime filter plan

This patch fixes a bug that fails a precondition check when generating
runtime filter plans. The lhs and rhs or join predicate might have
different types when the eq predicate function accepts wildcard-typed
parameters. In this case in existing code the types of source and target
expr will be found mismatch and an exception will be thrown when
generating runtime filters. This patch tries to cast target expr to be
of the same type as source expr. A testcase is added to joins.test

Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
---
M fe/src/main/java/org/apache/impala/analysis/AnalyticExpr.java
M fe/src/main/java/org/apache/impala/analysis/Expr.java
M fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java
M fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java
M testdata/workloads/functional-planner/queries/PlannerTest/runtime-filter-propagation.test
M testdata/workloads/functional-query/queries/QueryTest/runtime_row_filters.test
6 files changed, 53 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/49/7949/4
-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>

[Impala-ASF-CR] IMPALA-5597: Try casting targetExpr when building runtime filter plan

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-5597: Try casting targetExpr when building runtime filter plan
......................................................................


Patch Set 2:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/7949/2/fe/src/main/java/org/apache/impala/analysis/Expr.java
File fe/src/main/java/org/apache/impala/analysis/Expr.java:

PS2, Line 866: 
Thanks for removing


http://gerrit.cloudera.org:8080/#/c/7949/2/fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java
File fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java:

Line 585:       targetExpr = targetExpr.substitute(smap, analyzer,false);
Better to use try/catch and return null in case the re-analysis (part of substitute()) fails for some reason.

Space before "false"


Line 587:     Type srcType = filter.getSrcExpr().getType();
Add a comment explaining why the types must be identical


Line 591:       } catch(AnalysisException | IllegalArgumentException e){
catch Exception

formatting (space after catch, space before "{")


Line 594:       Preconditions.checkState(targetExpr.getType().equals(srcType));
remove (obviously true from code above)


http://gerrit.cloudera.org:8080/#/c/7949/2/testdata/workloads/functional-query/queries/QueryTest/joins.test
File testdata/workloads/functional-query/queries/QueryTest/joins.test:

Line 774: ---- QUERY
Also add a planner test in runtime-filter-propagation.test


Line 775: # IMPALA-5597: Tests that a join on clause with lhs and rhs having different types will
Comment is wrong.


Line 777: select *
EE test should go into runtime_row_filters.test


-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-5597: Check predicate children types when building runtime filter plan

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-5597: Check predicate children types when building runtime filter plan
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7949/1//COMMIT_MSG
Commit Message:

Line 14: With this patch such runtime filters are abandoned.
Do they have to be abandoned? We we make them work instead?


-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-5597: Try casting targetExpr when building runtime filter plan

Posted by "Tianyi Wang (Code Review)" <ge...@cloudera.org>.
Tianyi Wang has posted comments on this change.

Change subject: IMPALA-5597: Try casting targetExpr when building runtime filter plan
......................................................................


Patch Set 2:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/7949/2/fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java
File fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java:

Line 585:       targetExpr = targetExpr.substitute(smap, analyzer,false);
> Better to use try/catch and return null in case the re-analysis (part of su
Done


Line 587:     Type srcType = filter.getSrcExpr().getType();
> Add a comment explaining why the types must be identical
Done


Line 591:       } catch(AnalysisException | IllegalArgumentException e){
> catch Exception
Done


Line 594:       Preconditions.checkState(targetExpr.getType().equals(srcType));
> remove (obviously true from code above)
Done


http://gerrit.cloudera.org:8080/#/c/7949/2/testdata/workloads/functional-query/queries/QueryTest/joins.test
File testdata/workloads/functional-query/queries/QueryTest/joins.test:

Line 774: ---- QUERY
> Also add a planner test in runtime-filter-propagation.test
Done. What does propagation mean here?


Line 775: # IMPALA-5597: Tests that a join on clause with lhs and rhs having different types will
> Comment is wrong.
Done


Line 777: select *
> EE test should go into runtime_row_filters.test
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-5597: Try casting targetExpr when building runtime filter plan

Posted by "Tianyi Wang (Code Review)" <ge...@cloudera.org>.
Tianyi Wang has uploaded a new patch set (#2).

Change subject: IMPALA-5597: Try casting targetExpr when building runtime filter plan
......................................................................

IMPALA-5597: Try casting targetExpr when building runtime filter plan

This patch fixes a bug that fails a precondition check when generating
runtime filter plans. The lhs and rhs or join predicate might have
different types when the eq predicate function accepts wildcard-typed
parameters. In this case in existing code the types of source and target
expr will be found mismatch and an exception will be thrown when
generating runtime filters. This patch tries to cast target expr to be
of the same type as source expr. A testcase is added to joins.test

Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
---
M fe/src/main/java/org/apache/impala/analysis/AnalyticExpr.java
M fe/src/main/java/org/apache/impala/analysis/Expr.java
M fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java
M fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java
M testdata/workloads/functional-query/queries/QueryTest/joins.test
5 files changed, 20 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/49/7949/2
-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>

[Impala-ASF-CR] IMPALA-5597: Try casting targetExpr when building runtime filter plan

Posted by "Tianyi Wang (Code Review)" <ge...@cloudera.org>.
Tianyi Wang has uploaded a new patch set (#3).

Change subject: IMPALA-5597: Try casting targetExpr when building runtime filter plan
......................................................................

IMPALA-5597: Try casting targetExpr when building runtime filter plan

This patch fixes a bug that fails a precondition check when generating
runtime filter plans. The lhs and rhs or join predicate might have
different types when the eq predicate function accepts wildcard-typed
parameters. In this case in existing code the types of source and target
expr will be found mismatch and an exception will be thrown when
generating runtime filters. This patch tries to cast target expr to be
of the same type as source expr. A testcase is added to joins.test

Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
---
M fe/src/main/java/org/apache/impala/analysis/AnalyticExpr.java
M fe/src/main/java/org/apache/impala/analysis/Expr.java
M fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java
M fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java
M testdata/workloads/functional-planner/queries/PlannerTest/runtime-filter-propagation.test
M testdata/workloads/functional-query/queries/QueryTest/runtime_row_filters.test
6 files changed, 54 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/49/7949/3
-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>

[Impala-ASF-CR] IMPALA-5597: Try casting targetExpr when building runtime filter plan

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged.

Change subject: IMPALA-5597: Try casting targetExpr when building runtime filter plan
......................................................................


IMPALA-5597: Try casting targetExpr when building runtime filter plan

This patch fixes a bug that fails a precondition check when generating
runtime filter plans. The lhs and rhs or join predicate might have
different types when the eq predicate function accepts wildcard-typed
parameters. In this case in existing code the types of source and target
expr will be found mismatch and an exception will be thrown when
generating runtime filters. This patch tries to cast target expr to be
of the same type as source expr. A testcase is added to joins.test

Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Reviewed-on: http://gerrit.cloudera.org:8080/7949
Reviewed-by: Alex Behm <al...@cloudera.com>
Tested-by: Impala Public Jenkins
---
M fe/src/main/java/org/apache/impala/analysis/AnalyticExpr.java
M fe/src/main/java/org/apache/impala/analysis/Expr.java
M fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java
M fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java
M testdata/workloads/functional-planner/queries/PlannerTest/runtime-filter-propagation.test
M testdata/workloads/functional-query/queries/QueryTest/runtime_row_filters.test
6 files changed, 53 insertions(+), 16 deletions(-)

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



-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>

[Impala-ASF-CR] IMPALA-5597: Try casting targetExpr when building runtime filter plan

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change.

Change subject: IMPALA-5597: Try casting targetExpr when building runtime filter plan
......................................................................


Patch Set 4: Verified+1

-- 
To view, visit http://gerrit.cloudera.org:8080/7949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0d66673e280ce13cd3a514236c0c2ecbc50475a6
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>
Gerrit-HasComments: No