REST: Add case-insensitive identifier resolution for REST catalog#16069
REST: Add case-insensitive identifier resolution for REST catalog#16069lunar-shadow wants to merge 1 commit intoapache:mainfrom
Conversation
934588b to
eec9a76
Compare
| "upper_case".equals(caseType) | ||
| ? ident.name().toUpperCase(Locale.ROOT) | ||
| : ident.name().toLowerCase(Locale.ROOT); | ||
| return TableIdentifier.of(convertedNs, convertedName); |
There was a problem hiding this comment.
Trino Iceberg connector supports the iceberg.rest-catalog.case-insensitive-name-matching configuration property, but its behavior differs from the approach in this PR. I'm commenting here because the PR description refers to Trino.
The connector attempts to locate remote objects in a case-insensitive way by iterating over namespaces and tables and comparing their lowercase forms. If it encounters an ambiguous situation (for example, both ORDERS and orders exist), it throws an exception. This logic correctly handles mixed-case names, whereas this PR appears to address only the uppercase case.
|
Hi @lunar-shadow , thanks for the PR!
|
Summary
Add case-insensitive identifier normalization to
RESTCatalog, controlled by two catalog properties:case-insensitive(default:false) - enable/disable case normalizationcase-insensitive-type(default:lower_case) - conversion mode (lower_caseorupper_case)When enabled, all namespace, table, and view identifiers are normalized to a consistent case before being sent to the catalog backend.
Motivation
REST catalogs that preserve identifier case (e.g.,
CustomerDB.Orders) causeSCHEMA_NOT_FOUND/TABLE_NOT_FOUNDerrors when query engines like Spark normalize identifiers to lowercase. This affects interoperability across mixed-client ecosystems (Spark, Flink, Trino).Closes: #14386