IMPALA-15641: Interpret escapes in the fast paths of LIKE LikePredicate::OptimizeConstantPatternMatch() matched constant patterns and simple prefix, suffix and substring patterns verbatim, while the regex path, which is also used for patterns that are not constant, treats a backslash as an escape for any character and ignores a trailing backslash. So the result depended on the shape of the pattern, e.g. 'abc%x' LIKE 'abc\%%' was false, but 'abc%x' LIKE 'abc\%_%' was true. IMPALA-10849 and IMPALA-14731 fixed this only for patterns that end with an escaped '%'. Now all paths follow the same rule: a backslash escapes '%', '_' and itself, and before any other character, or at the end of the pattern, it is a literal backslash. This matches Hive, except that '\\' is two backslashes in Hive. The fast paths are chosen and their search strings computed after interpreting the escapes, so they are only an optimization. Patterns that are not valid UTF-8 still take the regex path, which rejects them. Changed results, where '...' is any string and '?' is any character. The patterns are after SQL string literal unescaping, e.g. s LIKE 'C:\\dir%' is the pattern C:\dir%. Pattern Path Before After abc\%% fast abc\... abc%... %\%% fast ...\... ...%... a\\b% fast a\\b... a\b... C:\dir_% regex C:dir?... C:\dir?... a%\ regex a... a...\ Patterns that are not constant and ILIKE always took the regex path, e.g. C:\dir% matched C:dir... for them. IcebergPredicateConverter mirrored the verbatim fast paths when pushing down LIKE to Iceberg (IMPALA-15634). Now it unescapes every pattern the same way as the backend. Documented the escapes of LIKE and the change in the 5.0 incompatible changes. Removed the IMPALA-2422 known issue, its example works since IMPALA-10849. Testing: - Added BE tests for the escapes, also checking that the fast paths match the same values as the regex for non-constant patterns. - Updated FE tests and added EE tests for LIKE push down with escapes. - Built plain-html docs without errors. Change-Id: Ia8b6872a6a200bfadb36d3ee83869bde76b8f3a5 Assisted-by: Claude Opus 5.5 (Claude Code) Reviewed-on: https://gerrit.cloudera.org/25198 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Lightning-fast, distributed SQL queries for petabytes of data stored in open data and table formats.
Impala is a modern, massively-distributed, massively-parallel, C++ query engine that lets you analyze, transform and combine data from a variety of data sources:
The fastest way to try out Impala is a quickstart Docker container. You can try out running queries and processing data sets in Impala on a single machine without installing dependencies. It can automatically load test data sets into Apache Kudu and Apache Parquet formats and you can start playing around with Apache Impala SQL within minutes.
To learn more about Impala as a user or administrator, or to try Impala, please visit the Impala homepage. Detailed documentation for administrators and users is available at Apache Impala documentation.
If you are interested in contributing to Impala as a developer, or learning more about Impala's internals and architecture, visit the Impala wiki.
Impala only supports Linux at the moment. Impala supports x86_64 and arm64 (as of Impala 4.4). Impala Requirements contains more detailed information on the minimum CPU requirements.
Impala runs on Linux systems only. The supported distros are
Other systems, e.g. SLES15/16, may also be supported but are not tested by the community.
This distribution uses cryptographic software and may be subject to export controls. Please refer to EXPORT_CONTROL.md for more information.
See Impala's developer documentation to get started.
Detailed build notes has some detailed information on the project layout and build.