> Vladimir wrote:
>
> 5. The optimization of disjoint conditions might take significant
> optimization time with insignificant gains.
Can you give an example?
I am proposing to use sargs only where we would today use RexCall(IN). The data
structures have about the same size. Sargs are sorted. I cannot see any cases
that would become more expensive.
> Sargs might be helpful as databases often need to implement "integer/string
> index range scan", however, sargs do not seem to suit well for `col
> intersect any(...)` and similar cases.
Requiring sargs to support geospatial operations seems an unreasonably high
bar. Many techniques that we use (sorting, hashing, sketches) do not support
geospatial.
> I remember Calcite sources did include sargs package, however, it was
> removed for some reason.
That is correct. We once had b-tree indexes and column store; when we removed
these, sargs were no longer used. Guava RangeSet is superior to the sargs
classes we threw away.
Julian