Yingyi Bu has posted comments on this change.
Change subject: Compile a plan that matches user query in the case of nonpure
functions
......................................................................
Patch Set 4:
(2 comments)
I'm not sure how general the mechanism of "ConstantAtRuntimeExpressions()" is.
Does it work with general cases?
For example,
for $x in dataset foo
let $time := current-time()
for $y in dataset bar
where $y.time > $time-50
return {
"x_id": $x.id,
"y_id": $y.id
}
for $x in dataset foo
let $time := current-time()
return {
"x_id": $x.id,
"y_ids": for $y in dataset bar where $y.time > $time-50
}
What's the query plan of the above queries look like?
https://asterix-gerrit.ics.uci.edu/#/c/1057/4/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/BTreeAccessMethod.java
File
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/BTreeAccessMethod.java:
Line 729: //Nonpure nonjoin case
It's not intuitive for me to understand the if condition, e.g., why this cannot
lead to false positives or false dismissals?
https://asterix-gerrit.ics.uci.edu/#/c/1057/4/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IOptimizableFuncExpr.java
File
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IOptimizableFuncExpr.java:
Line 80: ILogicalExpression[] getConstantAtRuntimeExpressions();
What does ConstantAtRuntimeExpressions() mean?
It's not obvious to me how this is general enough for nested subqueries?
--
To view, visit https://asterix-gerrit.ics.uci.edu/1057
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2dec322b30835625430c06acd7626d902bada137
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>
Gerrit-Reviewer: Preston Carman <[email protected]>
Gerrit-Reviewer: Steven Jacobs <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>
Gerrit-HasComments: Yes