wgtmac commented on code in PR #942:
URL: https://github.com/apache/iceberg-cpp/pull/942#discussion_r4322829598
##########
src/iceberg/arrow_c_data_util_internal.h:
##########
@@ -242,4 +243,20 @@ ICEBERG_EXPORT Result<ArrowArray> ProjectBatch(ArrowArray*
input_batch,
std::span<const int32_t>
row_indices,
ProjectionContext& projection);
+namespace arrow {
+
+/// \brief Align an Arrow batch to an Iceberg write schema.
+///
+/// Fields are matched by Iceberg field id. Missing fields are materialized
from their
+/// `write-default`, or as null when optional. Missing required fields without
a
+/// `write-default` are rejected. Existing values, including explicit nulls,
are
+/// preserved. Structs, lists, and maps are aligned recursively.
+///
+/// `input_batch` is consumed even when alignment fails.
+ICEBERG_BUNDLE_EXPORT Result<ArrowArray> AlignBatchForWrite(ArrowArray*
input_batch,
Review Comment:
Shouldn't we remove `arrow` namespace and directly use `ICEBERG_EXPORT` here?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]