pitrou commented on code in PR #51239:
URL: https://github.com/apache/arrow/pull/51239#discussion_r3968436300


##########
cpp/src/parquet/metadata.cc:
##########
@@ -1022,8 +1022,8 @@ class FileMetaData::FileMetaDataImpl {
     if (metadata_->schema.empty()) {
       throw ParquetException("Empty file schema (no root)");
     }
-    schema_.Init(schema::Unflatten(&metadata_->schema[0],
-                                   
static_cast<int>(metadata_->schema.size())));
+    schema_.Init(schema::Unflatten(metadata_->schema,
+                                   
/*max_depth=*/properties_.schema_depth_limit()));

Review Comment:
   What a weird piece of code by the way. It serializes schema metadata to 
Thrift and then reconstructs the schema from the serialized Thrift??



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