|
Implement heuristic CE for FilterNode that contains a Boolean path expression of comparison operations. Boolean expressions inside a FilterNode are expressed via PathComposeM (AND), and PathComposeA (OR) nodes. This task should implement a transport that walks such path expression trees, and:
- given an atomic comparison predicate uses Heuristic CE,
- given a conjunction/disjunction applies exponential backoff estimation via bottom-up recursion.
This one example of a disjunction:
Query: {$or: [{a0: {$gt:44}}, {a0: {$lt: 9}}]}
|
|
Root []
|
| | projections:
|
| | scan_0
|
| RefBlock:
|
| Variable [scan_0]
|
Filter []
|
| EvalFilter []
|
| | Variable [scan_0]
|
| PathComposeA []
|
| | PathGet [a0]
|
| | PathTraverse []
|
| | PathComposeM []
|
| | | PathCompare [Gte]
|
| | | Const [nan]
|
| | PathCompare [Lt]
|
| | Const [9]
|
| PathGet [a0]
|
| PathTraverse []
|
| PathComposeM []
|
| | PathCompare [Lt]
|
| | Const [""]
|
| PathCompare [Gt]
|
| Const [44]
|
Scan [test]
|
BindBlock:
|
[scan_0]
|
Source []
|
This an example of more complex conjunction:
Query: {$and : [{$or : [ {a0 : {$gt : 11}}, {a0 : {$lt : 44}} ]},{$or : [ {a0 : {$gt : 77}}, {a0 : {$eq : 51}} ]}]}
|
Initial ABT:
|
Root []
|
| | projections:
|
| | scan_0
|
| RefBlock:
|
| Variable [scan_0]
|
Filter []
|
| EvalFilter []
|
| | Variable [scan_0]
|
| PathComposeA []
|
| | PathGet [a0]
|
| | PathTraverse []
|
| | PathCompare [Eq]
|
| | Const [51]
|
| PathGet [a0]
|
| PathTraverse []
|
| PathComposeM []
|
| | PathCompare [Lt]
|
| | Const [""]
|
| PathCompare [Gt]
|
| Const [77]
|
Filter []
|
| EvalFilter []
|
| | Variable [scan_0]
|
| PathComposeA []
|
| | PathGet [a0]
|
| | PathTraverse []
|
| | PathComposeM []
|
| | | PathCompare [Gte]
|
| | | Const [nan]
|
| | PathCompare [Lt]
|
| | Const [44]
|
| PathGet [a0]
|
| PathTraverse []
|
| PathComposeM []
|
| | PathCompare [Lt]
|
| | Const [""]
|
| PathCompare [Gt]
|
| Const [11]
|
Scan [test]
|
BindBlock:
|
[scan_0]
|
Source []
|
|