zhjwpku commented on code in PR #317:
URL: https://github.com/apache/iceberg-cpp/pull/317#discussion_r2556492384


##########
src/iceberg/manifest_reader_internal.cc:
##########
@@ -367,13 +367,16 @@ Status ParseDataFile(const std::shared_ptr<StructType>& 
data_file_schema,
           return InvalidManifest("Field:{} should be a struct.", field_name);
         }
         if (view_of_file_field->n_children > 0) {
-          auto view_of_partition = view_of_file_field->children[0];
-          for (int64_t row_idx = 0; row_idx < view_of_partition->length; 
row_idx++) {
-            if (ArrowArrayViewIsNull(view_of_partition, row_idx)) {
-              break;
+          for (int64_t partition_idx = 0; partition_idx < 
view_of_file_field->n_children;
+               partition_idx++) {
+            auto view_of_partition = 
view_of_file_field->children[partition_idx];
+            for (int64_t row_idx = 0; row_idx < view_of_partition->length; 
row_idx++) {
+              if (ArrowArrayViewIsNull(view_of_partition, row_idx)) {

Review Comment:
   Good question. The fix here was intended to handle multiple partition 
values, but I'm not sure why we didn't follow the case 2 pattern. @dongxiao1198 
can you share some insight?



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

Reply via email to