viirya opened a new pull request, #2014: URL: https://github.com/apache/iceberg-rust/pull/2014
Implement pushdown for LIKE predicates with simple prefix patterns (e.g., 'prefix%') to Iceberg's StartsWith operator. This optimization allows filtering to be performed at the storage layer, significantly improving query performance for prefix searches. Changes: - Add support for Expr::Like in predicate conversion - Convert LIKE 'prefix%' patterns to StartsWith operator - Convert NOT LIKE 'prefix%' patterns to NotStartsWith operator - Handle edge cases: empty prefix, unicode, special characters - Reject complex patterns that cannot be pushed down (wildcards in middle, underscore, ILIKE) - Add 8 comprehensive unit tests covering various scenarios Implementation details: - Only simple prefix patterns ending with % are converted - Patterns with % or _ wildcards in the prefix are not pushed down - Case-insensitive LIKE (ILIKE) is not supported for pushdown - Escape characters are not supported for pushdown - Works seamlessly with other predicates in AND/OR expressions ## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> - Closes #. ## What changes are included in this PR? <!-- Provide a summary of the modifications in this PR. List the main changes such as new features, bug fixes, refactoring, or any other updates. --> ## Are these changes tested? <!-- Specify what test covers (unit test, integration test, etc.). If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
