The AI-native database built for LLM applications, providing incredibly fast hybrid search of dense vector, sparse vector, tensor (multi-vector), and full-text
As we know that almost all optimizers are based on rules, just like too functions: match and replace, means that if we match the expression, then we can replace the old expression to a new expression.
so can we
design a new dsl only for optimizer rule
write a tiny compiler and transform the dsl to rule(eg: c++ code)
then we don't need write new optimizer rules, just write the dsl code
here is an example:
if we has a Match And Replace function for Filter:
Using a DSL to define RBO rules is a very cool approach. But, considering the road map of Infinity, we won't start the development of this feature, recently.
Describe your problem
As we know that almost all optimizers are based on rules, just like too functions:
match
andreplace
, means that if wematch
the expression, then we canreplace
the old expression to a new expression.so can we
dsl code
here is an example: if we has a
Match
AndReplace
function forFilter
:Then the sql expression
can rewrite to the following directly: