Dmitry Lychagin has posted comments on this change.

Change subject: [ASTERIXDB-2402][COMP] Allow AND for IsMissing in Groupby
......................................................................


Patch Set 7:

(2 comments)

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

Line 1499:                         && 
assign.getExpressions().get(i).getValue().equals(ConstantExpression.TRUE)) {
Don't check that the value is true, because the optimizer only needs to prove 
that the value exists for that variable. The easiest way of doing it is to 
create assign var = true on the right branch, but in general it could choose 
any other variable from the right branch that always has the value. We only 
need to check that the variable is coming from the right branch, that's all. 
You can use VariableUtilities.getSubplanLocalLiveVariables() for that.


Line 1522:                         if 
(confirmAssignOperatorForIsMissingVar(var, leftSubTree.getRoot())
> MAJOR SonarQube violation:
I think you only need to check that the variable is coming from the right 
branch of the left outer join. It you find not(missing(var)) for the right 
branch variable then return this not(missing()) function


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9547fba5e4ba02226b5b2c2504080b091d3b8d5e
Gerrit-PatchSet: 7
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Steven Jacobs <[email protected]>
Gerrit-Reviewer: Xikui Wang <[email protected]>
Gerrit-HasComments: Yes

Reply via email to