pitrou commented on a change in pull request #7973:
URL: https://github.com/apache/arrow/pull/7973#discussion_r474106190



##########
File path: cpp/src/parquet/arrow/schema.cc
##########
@@ -410,21 +410,66 @@ ::arrow::Result<std::shared_ptr<ArrowType>> 
GetTypeForNode(
   return storage_type;
 }
 
-Status NodeToSchemaField(const Node& node, int16_t max_def_level, int16_t 
max_rep_level,
+struct LevelInfo {
+  int16_t def_level = 0;
+  int16_t rep_level = 0;
+  int16_t repeated_ancestor_def_level = 0;

Review comment:
       Structure with these three fields seem to be in multiple numbers now? 
Perhaps we should simply use `LevelInfo` as a plain datatype everywhere instead 
of copying all three fields by hand everytime?

##########
File path: cpp/src/parquet/arrow/schema.cc
##########
@@ -410,21 +410,66 @@ ::arrow::Result<std::shared_ptr<ArrowType>> 
GetTypeForNode(
   return storage_type;
 }
 
-Status NodeToSchemaField(const Node& node, int16_t max_def_level, int16_t 
max_rep_level,
+struct LevelInfo {
+  int16_t def_level = 0;
+  int16_t rep_level = 0;
+  int16_t repeated_ancestor_def_level = 0;

Review comment:
       Structures with these three fields seem to be in multiple numbers now? 
Perhaps we should simply use `LevelInfo` as a plain datatype everywhere instead 
of copying all three fields by hand everytime?




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to