asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yingyi Bu (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: Convert comparisons with current-datetime, current-date, and...
Date Wed, 23 Sep 2015 04:16:13 GMT
Yingyi Bu has posted comments on this change.

Change subject: Convert comparisons with current-datetime, current-date, and current-time
to applicable index searches as though they were constants
......................................................................


Patch Set 1:

(3 comments)

What I mean is that the code to infer whether a function expression is a constant could be
more general.

For example, function call foo() should be a constant because it doesn't have any variable
input and function foo2(foo()) is also a constant because there is no variable input in the
expression tree.

https://asterix-gerrit.ics.uci.edu/#/c/367/1/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AbstractIntroduceAccessMethodRule.java
File asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AbstractIntroduceAccessMethodRule.java:

Line 223:                             //add type to indexTypes from current-*, if applicable
what does "current-*" mean here?


https://asterix-gerrit.ics.uci.edu/#/c/367/1/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AccessMethodUtils.java
File asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AccessMethodUtils.java:

Line 660:         if (expr instanceof AbstractFunctionCallExpression) {
The code here could be more general?

For example,  you can know whether an expression is a constant by analyzing its expression
tree and you know the return type from the type computer.


https://asterix-gerrit.ics.uci.edu/#/c/367/1/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/BTreeAccessMethod.java
File asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/BTreeAccessMethod.java:

Line 268:             if (!(searchKeyExpr instanceof ConstantExpression)
use ILogicalExpression.getExpressionTag()


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/367
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ied64276873afcfbdd31dac313009e47429d8f9b0
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs <sjaco002@ucr.edu>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Preston Carman <prestonc@apache.org>
Gerrit-Reviewer: Steven Jacobs <sjaco002@ucr.edu>
Gerrit-Reviewer: Till Westmann <tillw@apache.org>
Gerrit-Reviewer: Yingyi Bu <buyingyi@gmail.com>
Gerrit-HasComments: Yes

Mime
View raw message