-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
QO 2022-03-07, QO 2022-03-21, QO 2022-04-04, QO 2022-04-18, QO 2022-05-02
WRITING-8202 implements interval intersection when interval boundaries are constants.
This task should extend the intersection logic to handle also variable boundaries.
The approach suggested by svilen.mihaylov is to combine the boundaries of intervals via min/max expressions. For instance (f1 < C) AND (f1 < V) is represented as (f1 < min(C, V)). If both C and V turn out to be constant, then constant folding will fold this into the smaller of the two. If at least on is a variable, then the conjunction is rewritten as as MIN expression, and is propagated further through the optimizer.
A constant folding phase just before execution could fold the min/max boundary expressions into constants.