fix attaching an Iceberg database through a REST catalog - #89
Conversation
|
Thanks for fixing the Iceberg REST 1. Broken identifier quoting ( "SELECT * FROM \"{}\".{}.{} LIMIT 0", catalogName, schemaName, tableNameOnly the catalog is double-quoted; schema/table are interpolated bare with no 2. Inconsistent guard ( if (parts.size() == 3 && result->RowCount() == 1 && ...
3. Unhandled failure of the fallback query
4. Duplicated magic check with different column orders The |
Signed-off-by: ericyuanhui <285521263@qq.com>
2a76a95 to
bb71865
Compare
Thanks for your questions and suggestions. All of them have been incorporated into the current commit. |
|
Thank you! |
Problem: When attaching an Iceberg database through a REST catalog, DuckDB may initially report only a placeholder column named
__with typeUNKNOWNininformation_schema.columns, rather than the table’s actual schema. Ladybug previously used this information to register the external table, causingATTACHto fail becauseUNKNOWNis unsupported. Subsequent column-name lookups could also mistake__for a real column.Fix: When the only reported column is
__ / UNKNOWN, runSELECT * FROM ... LIMIT 0and use the result’s actual column names and types to register the external table and resolve subsequent column-name lookups. This query returns no data rows but triggers schema resolution. The Iceberg documentation is also updated to clarify the roles of the REST catalog and embedded DuckDB, as well as how to configure an unauthenticated REST endpoint.