Hi, I want to exclude SEARCH operator introduced in calcite 1.26.0 from my optimized Rel Expression. I'm calling org.apache.calcite.tools.Frameworks.ConfigBuilder#operatorTable with a customized set of operators which doesn't include SEARCH. But when a HepPlanner is used to optimize the RelNode tree, seems it converts
LogicalFilter(condition=[AND(>($1, 1), <($1, 5))]) to LogicalFilter(condition=[SEARCH($0, Sarg[(1..5)])]). HepProgram used with HepPlanner has been configured with a set of RelOptRules, some are CoreRules while some are not. While exploring I found that RexBuilder has SqlStdOperatorTable hardcoded. But I don't this being used anywhere during the optimization process. Seems org.apache.calcite.rex.RexSimplify does what it does regardless of what we have in RexBuilder. https://github.com/apache/calcite/blob/e6f7cac6a2fc4cd4ddf9dc6f29723947cbf99afe/core/src/main/java/org/apache/calcite/rex/RexBuilder.java#L109 Could this be the reason or is there a way to exclude certain internal operators from the optimizations? Regards, Chathura
