Skip to content

Get, Set, Remove schema_properties#960

Open
yan-alex wants to merge 32 commits intoduckdb:v1.5-variegatafrom
yan-alex:schema-properties-update
Open

Get, Set, Remove schema_properties#960
yan-alex wants to merge 32 commits intoduckdb:v1.5-variegatafrom
yan-alex:schema-properties-update

Conversation

@yan-alex
Copy link
Copy Markdown
Member

@yan-alex yan-alex commented Apr 24, 2026

https://github.com/duckdblabs/duckdb-internal/issues/8996

Added the following functions
iceberg_schema_properties()
set_iceberg_schema_properties()
remove_iceberg_schema_properties()

Comment thread src/function/metadata/iceberg_schema_properties_functions.cpp
@yan-alex yan-alex requested a review from Tishj April 28, 2026 13:29
Copy link
Copy Markdown
Member

@Tmonster Tmonster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! A couple of questions

Comment thread src/catalog/rest/catalog_entry/schema/iceberg_schema_entry.cpp Outdated
Comment thread src/function/metadata/iceberg_schema_properties_functions.cpp Outdated
Comment thread src/function/metadata/iceberg_schema_properties_functions.cpp Outdated
vector<unique_ptr<IcebergTransactionUpdate>> transaction_updates;
//! The latest state of a table (either points into 'transaction_updates' or 'tables')
case_insensitive_map_t<IcebergTransactionTableState> current_table_data;
case_insensitive_map_t<case_insensitive_map_t<string>> current_schema_properties;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:
could you re-use the SchemaPropertyUpdates struct here as well?
i.e case_insentive_map<SchemaPropertyUpdates>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thing you brought it up, I removed this field for now.
I feel like this transaction state tracking should be done as part of a bigger change to keep track of the transaction schema state which we currently don't do. So for this PR I think we just use IcebergSchemaEntry

Comment thread src/include/execution/operator/iceberg_insert.hpp Outdated
Comment thread src/include/catalog/rest/catalog_entry/schema/iceberg_schema_information.hpp Outdated
@yan-alex yan-alex requested a review from Tmonster April 28, 2026 15:11
@yan-alex
Copy link
Copy Markdown
Member Author

@Tmonster addressed your feeedback. CI failure is from networking

Copy link
Copy Markdown
Member

@Tmonster Tmonster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'm not sure this will work for nested namespaces unfortunately.

Comment thread src/function/metadata/iceberg_schema_properties_functions.cpp Outdated
}
auto create_body = JsonDocToString(std::move(doc_p));

IRCAPI::CommitNamespacePropertiesUpdate(context, ic_catalog, create_body, schema_name_no_catalog);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the namespace properties update does consider nested namespaces. Can we add some tests to make sure that also works?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tmonster added support for nested namespaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants