Steven Jacobs 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 3: (9 comments) Okay, I think I addressed all of the issues. I am uploading a new patch set now. https://asterix-gerrit.ics.uci.edu/#/c/367/3/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 226: if (indexedTypes.size() < 2 && optFuncExpr.getNumLogicalVars() == 1 && typeEnvironment != null) { > In which the type environment can be null? Done https://asterix-gerrit.ics.uci.edu/#/c/367/3/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 140: if (expressionType == null) { > In which case it could be a null? Added Comment Line 149: if (expressionType == null) { > In which case it could be null? Same Line 338: if (constantExpression instanceof ConstantExpression) { > constantExpression.getExpressionTag() == ExpressionTag.Constant Done Line 351: if (constantValueTag != fieldType.getTypeTag() && constantValue != null) { > In which case constantValue can be a null? If the comparison is with an expression that is constant at runtime rather than being an actual constant. Line 637: if (typeEnvironment == null || context == null) { > Should we throw an exception if context or type-env is null? Done https://asterix-gerrit.ics.uci.edu/#/c/367/3/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 240: ILogicalExpression[] constExpressions = new ILogicalExpression[numSecondaryKeys]; > rename it? It actually doesn't store "constant" expressions but functaion- Done Line 241: LogicalVariable[] constExprVars = new LogicalVariable[numSecondaryKeys]; > rename it? Done Line 276: && !(searchKeyExpr instanceof VariableReferenceExpression)) { > if(searchKeyExpr.getExpressionTag()==LogicalExpressionTag.FUNCTION_CALL) Done -- 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: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Steven Jacobs <[email protected]> Gerrit-Reviewer: Ian Maxon <[email protected]> Gerrit-Reviewer: Ildar Absalyamov <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Preston Carman <[email protected]> Gerrit-Reviewer: Steven Jacobs <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-Reviewer: Yingyi Bu <[email protected]> Gerrit-HasComments: Yes
