-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
Currently, the child of a SargableNode is not always a ScanNode after the substitution phase. This happens when the SargableMerge fails to merge two SargableNode (e.g. one of them has non-singleton disjunction requirement) in the substitution phase. Such SargableNode will remain in memo until the exploration phase.
Due to this, a SamplingEstimator may encounter such SargableNode and has to fall back to heuristic estimation without an additional check.
To address that:
- Create a SubstituteConvert<SargableNode> rewrite which converts SargableNode back to a FilterNode like what ExploreConvert<Sargablenode> does today by calling lowerSargableNode(sargableNode, ctx).
- Update the TODO in the sampling_estimator.cpp into an assertion such that the child of a SargableNode is always a ScanNode.
- is related to
-
SERVER-81589 [CQF] Avoid optimizer round-trip for lowering of SargableNode for sampling queries
- Closed