Open
Description
Existing PushFilterIntoValues has a low default of 100
.
The main reason was that it could get expensive to evaluate. Filtering is done by constant folding the predicate once for each row:
Optional<Expression> optimizedPredicate = newOptimizer(plannerContext).process(rewrittenPredicate, context.getSession(), ImmutableMap.of());
Also, if a single row prevents the optimization from being applied, it bails out. In some cases, it might try this over and over after other optimizations adjust the plan a bit, so the cost can compound.
A rule specialized for constant values can be more efficient and allow evaluation of filter over bigger Value row counts.