asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yingyi Bu (Code Review)" <>
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:


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.
File asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/

Line 223:                             //add type to indexTypes from current-*, if applicable
what does "current-*" mean here?
File asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/

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.
File asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/

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

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Ied64276873afcfbdd31dac313009e47429d8f9b0
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs <>
Gerrit-Reviewer: Jenkins <>
Gerrit-Reviewer: Preston Carman <>
Gerrit-Reviewer: Steven Jacobs <>
Gerrit-Reviewer: Till Westmann <>
Gerrit-Reviewer: Yingyi Bu <>
Gerrit-HasComments: Yes

View raw message