wombatu-kun opened a new issue, #20225: URL: https://github.com/apache/hudi/issues/20225
### Bug Description **What happened:** With the column stats index enabled, a `LIKE 'abc%'` (or `startswith`) filter prunes a file whose values all start with the prefix, so the query silently returns too few rows. `DataSkippingUtils` translates the filter into `name_minValue <= 'abc' AND 'abc' <= name_maxValue`, but values starting with a prefix sort after the prefix itself (`'abc123' > 'abc'`), so a file whose min value is `'abc123'` fails the check. The partition stats index goes through the same translation. **What you expected:** Both rows returned. **Steps to reproduce:** ```sql CREATE TABLE t (id INT, name STRING) USING hudi TBLPROPERTIES (primaryKey = 'id', 'hoodie.metadata.index.column.stats.enable' = 'true'); INSERT INTO t VALUES (1, 'abc123'), (2, 'abc345'); SELECT id FROM t WHERE name LIKE 'abc%' ORDER BY id; -- expected: 1, 2 -- actual: no rows ``` ### Environment **Hudi version:** master (1.3.0-SNAPSHOT) **Query engine:** Spark 3.5 **Relevant configs:** `hoodie.metadata.index.column.stats.enable=true`, `hoodie.enable.data.skipping=true` (default) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
