Alex Behm has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8791 )

Change subject: IMPALA-6280: Materialize TupleIsNullPredicate for insert sorts
......................................................................


Patch Set 1:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/8791/1/fe/src/main/java/org/apache/impala/analysis/SortInfo.java
File fe/src/main/java/org/apache/impala/analysis/SortInfo.java:

http://gerrit.cloudera.org:8080/#/c/8791/1/fe/src/main/java/org/apache/impala/analysis/SortInfo.java@195
PS1, Line 195:     TreeNode.collect(Expr.substituteList(resultExprs, 
substOrderBy, analyzer, false),
Let's create a list like this:
List<Expr> substResultExprs = Expr.substituteList(resultExprs, substOrderBy, 
analyzer, false);

Which we can also pass in L211. Passing resultExprs in L211 is correct, but it 
includes some exprs we don't need.


http://gerrit.cloudera.org:8080/#/c/8791/1/fe/src/main/java/org/apache/impala/analysis/SortInfo.java@255
PS1, Line 255:    * Materializes any TupleIsNullPredicates present in 'exprs' 
into slots in
Comment sounds a little cluttered and some references like "the original expr" 
are not clear. Might be clearer to do something like this (but I'm open to 
other cleanup if you prefer that):

Collects the unique TupleIsNullPredicates from 'exprs' for each one:
* creates a new slot in ...
* adds the TupleIsNullPredicate to ...
* adds a entry in ... mapping from the TupleIsNullPredicate to a SlotRef into 
the new slot


http://gerrit.cloudera.org:8080/#/c/8791/1/fe/src/main/java/org/apache/impala/analysis/SortInfo.java@262
PS1, Line 262:     List<Expr> tupleIsNullPredsToMaterialize = 
Lists.newArrayList();
TreeNode.collect() like in L197

can also call this tupleIsNullPreds (it's clear we're going to materialize all 
of the unique ones)


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

http://gerrit.cloudera.org:8080/#/c/8791/1/fe/src/main/java/org/apache/impala/planner/AnalyticPlanner.java@287
PS1, Line 287:       List<Expr> possibleTupleIsNullPreds = Lists.newArrayList();
relevantRhsExprs


http://gerrit.cloudera.org:8080/#/c/8791/1/testdata/workloads/functional-query/queries/QueryTest/kudu_upsert.test
File testdata/workloads/functional-query/queries/QueryTest/kudu_upsert.test:

http://gerrit.cloudera.org:8080/#/c/8791/1/testdata/workloads/functional-query/queries/QueryTest/kudu_upsert.test@391
PS1, Line 391: # IMPALA-6280: check that TupleIsNullPredicate is materialized 
correctly
Good catch with the clustered hint, please modify the JIRA description to 
mention that case.

Also add a non-Kudu test for the clustered hint.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6c0ca717aa4321a5cc84edd1d5857912f8c85583
Gerrit-Change-Number: 8791
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Tauber-Marshall <tmarsh...@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com>
Gerrit-Comment-Date: Fri, 08 Dec 2017 00:20:52 +0000
Gerrit-HasComments: Yes

Reply via email to