Feature Request / Improvement
StrictMetricsEvaluator.startsWith currently always returns ROWS_MIGHT_NOT_MATCH, ignoring file-level column bounds entirely.
When the column's lower and upper bounds prove that every value in the file starts with the given prefix, the evaluator should return ROWS_MUST_MATCH. This allows the engine to skip unnecessary row-level filtering for STARTS WITH predicates, improving query performance on string-heavy workloads.
Specifically, the evaluator can determine that all rows match STARTS WITH <prefix> when:
- The column contains no null values
- Both the lower and upper bounds start with the prefix (truncated lower/upper each equal the prefix)
This mirrors how eq and the recently added notStartsWith (#15882) already use bounds in the same evaluator.
Query engine
None
Willingness to contribute
Feature Request / Improvement
StrictMetricsEvaluator.startsWithcurrently always returnsROWS_MIGHT_NOT_MATCH, ignoring file-level column bounds entirely.When the column's lower and upper bounds prove that every value in the file starts with the given prefix, the evaluator should return
ROWS_MUST_MATCH. This allows the engine to skip unnecessary row-level filtering forSTARTS WITHpredicates, improving query performance on string-heavy workloads.Specifically, the evaluator can determine that all rows match
STARTS WITH <prefix>when:This mirrors how
eqand the recently addednotStartsWith(#15882) already use bounds in the same evaluator.Query engine
None
Willingness to contribute