HuaHuaY commented on code in PR #50892:
URL: https://github.com/apache/arrow/pull/50892#discussion_r3920718986


##########
cpp/src/parquet/arrow/schema.cc:
##########
@@ -1059,9 +1094,16 @@ Result<bool> ApplyOriginalStorageMetadata(const Field& 
origin_field,
 
       // Apply original metadata recursively to children
       for (int i = 0; i < inferred_type->num_fields(); ++i) {
+        std::shared_ptr<::arrow::Field> origin_child;
+        if (match_children_by_name) {
+          origin_child = checked_cast<const ::arrow::StructType&>(*origin_type)

Review Comment:
   I am fine to add `DCHECK(origin_child != nullptr)`.



-- 
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]

Reply via email to