fix iceberg extension REST catalog file binder exception - #872
Conversation
|
The idea sounds good, but the knowledge of an extension (iceberg) leaks into the main repo. How about we design a callback or the extension does this eagerly and sets a bit somewhere for the main repo to understand it shouldn't glob? |
This solution looks much cleaner. I'll go ahead and refactor accordingly. Thank you for your suggestion! |
|
I'll hold the 0.20.2 release for a few hours if you want to get this in. |
Unfortunately, I am unlikely to meet the timeline. I have been occupied with other urgent tasks and have not yet made the modifications. I apologize for the delay. |
|
The root cause is that the current For a statement such as: LOAD FROM 'perf_demo.User' (file_format='iceberg') RETURN count(*);the flow is currently: The Iceberg extension only receives control later, when Ladybug selects and binds the Therefore, this cannot be fixed solely inside the current Iceberg extension while preserving the existing The existing extension mechanisms do not provide a hook before
A single global “Iceberg is loaded, do not glob” flag is also insufficient. Iceberg still supports ordinary filesystem-backed tables, metadata paths, and wildcard paths, all of which must retain the normal globbing behavior. Whether a source is a logical REST catalog identifier depends on the individual statement’s source, |
91b6c45 to
6ed5470
Compare
|
Signed-off-by: ericyuanhui <285521263@qq.com>
850224d to
5890d56
Compare
5890d56 to
300b67d
Compare
fix #871
Root Cause
The REST Catalog implementation was added in the Iceberg extension, but the core
LOAD FROMbinder still assumes that the source must be a filesystem path.The failure occurs before the extension table function is bound:
Solution
Update
bindFileScanSource()to recognize qualified Iceberg REST Catalog table names before filesystem globbing.When the following conditions are met:
iceberg_warehouseis configured;file_format='iceberg';namespace.tableoriceberg_catalog.namespace.table;the binder bypasses filesystem globbing and passes the source directly to the Iceberg extension.
Filesystem path validation is also skipped for these Catalog names because they are logical table identifiers, not local files.
Scope and Compatibility
The change is intentionally limited to Iceberg REST Catalog identifiers.
Existing behavior remains unchanged for:
No changes are made to the Iceberg extension implementation itself.
Result
After rebuilding Ladybug, the following queries can be resolved through the REST Catalog:
The fully qualified form is also supported: