-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
Fully Compatible
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Implement the narrowType dispatcher.
The type narrowing logic for MatchExpression will be implemented in the type_system module.
The narrowType signature should be:
Type narrowType(Type inputType, const MatchExpression* expr, bool assumeTrue);
We can implement this narrowType function using double-dispatch with a visitor, similar to exec::matcher::matches(..).
narrowType should use NarrowTypeMatchExpressionVisitor (or similar) which dispatches to a set of private narrowType overloads like:
Type narrowType(Type inputType, const TypeMatchExpression* expr, bool assumeTrue);
This will allow us to implement the type narrowing logic individually per MatchExpression type without touching the MatchExpression headers.