wgtmac commented on code in PR #1006:
URL: https://github.com/apache/iceberg-cpp/pull/1006#discussion_r4277546548
##########
src/iceberg/parquet/parquet_data_util.cc:
##########
@@ -147,15 +164,17 @@ Result<std::shared_ptr<::arrow::Array>>
ProjectStructArray(
if (projected_field.type()->is_nested()) {
const auto& nested_type =
internal::checked_cast<const NestedType&>(*projected_field.type());
+ // Metadata columns belong to top-level rows; nested fields need no
positions.
ICEBERG_ASSIGN_OR_RAISE(
projected_array,
ProjectNestedArray(parquet_array, output_arrow_type, nested_type,
- field_projection.children, metadata_context,
pool));
+ field_projection.children, metadata_context,
+ /*row_positions=*/nullptr, pool));
Review Comment:
A cleaner option would be to keep row positions only in a top-level struct
projection helper, and use a separate `ProjectNestedArray` overload without the
`row_positions` parameter for nested fields.
--
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]