leekeiabstraction commented on code in PR #611:
URL: https://github.com/apache/fluss-rust/pull/611#discussion_r3383711017
##########
bindings/cpp/src/admin.cpp:
##########
@@ -58,8 +60,37 @@ Result Admin::CreateTable(const TablePath& table_path, const
TableDescriptor& de
}
auto ffi_path = utils::to_ffi_table_path(table_path);
- auto ffi_desc = utils::to_ffi_table_descriptor(descriptor);
+ // A MAP/ROW column can't go through the flat FFI encoding, so the schema
is
+ // sent over Arrow instead (explicit via FromArrow, or lowered from native
+ // columns). Rust derives the columns from it, so the flat columns are
dropped
+ // here; primary keys / metadata still come from the descriptor.
+ std::shared_ptr<arrow::Schema> arrow_schema =
descriptor.schema.arrow_schema;
+ if (!arrow_schema) {
+ for (const auto& col : descriptor.schema.columns) {
+ if (detail::is_compound(col.data_type)) {
+ arrow_schema =
detail::columns_to_arrow_schema(descriptor.schema.columns);
+ break;
Review Comment:
Trying to understand why we break here, what if multiple columns are of
row/map type?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]