-
Type:
Task
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
QO 2022-07-25, QO 2022-08-08
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
Estimate the cardinality of a FilterNode that represents a single comparison predicate such as
{a: 5}, or {a: {$gt: 13}}.
This task should implement logic that walks the path expression of a FilterNode, extracts the components of a comparison operation, and calls the heuristic estimation function.
Below are a few examples of the structure of a FilterNode ABT:
Query: {a : 123} Root [] | | projections: | | scan_0 | RefBlock: | Variable [scan_0] Filter [] | EvalFilter [] | | Variable [scan_0] | PathGet [a] | PathTraverse [] | PathCompare [Eq] | Const [123] Scan [test] BindBlock: [scan_0] Source []
The below example shows that open-ended comparisons are always completed with the lowest (in this case the empty string "") value, or the greatest value of the type. This is done to ensure correct type bracketing behavior.
Query: {a: {$gt:44}} Initial ABT: Root [] | | projections: | | scan_0 | RefBlock: | Variable [scan_0] Filter [] | EvalFilter [] | | Variable [scan_0] | PathGet [a] | PathTraverse [] | PathComposeM [] | | PathCompare [Lt] | | Const [""] | PathCompare [Gt] | Const [44] Scan [test] BindBlock: [scan_0] Source []
- duplicates
-
SERVER-67776 Heuristic CE for FilterNode with a Boolean expression over comparison predicates
-
- Closed
-