We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c76e612 commit f0d35deCopy full SHA for f0d35de
parquet-variant/src/builder.rs
@@ -1266,11 +1266,8 @@ impl<'a> ObjectBuilder<'a> {
1266
field_a_name.cmp(field_b_name)
1267
});
1268
1269
- // the length of the metadata's field names is a very cheap to compute the upper bound.
1270
- // it will almost always be a tight upper bound as well -- it would take a pretty
1271
- // carefully crafted object to use only the early field ids of a large dictionary.
1272
- let max_id = metadata_builder.field_names.len();
1273
- let id_size = int_size(max_id);
+ let max_id = self.fields.iter().map(|(i, _)| *i).max().unwrap_or(0);
+ let id_size = int_size(max_id as usize);
1274
1275
let parent_buffer = self.parent_state.buffer();
1276
let current_offset = parent_buffer.offset();
0 commit comments