@@ -178,94 +178,114 @@ struct ICEBERG_EXPORT DataFile {
178178 // / present
179179 std::optional<int64_t > content_size_in_bytes;
180180
181+ inline static constexpr int32_t kContentFieldId = 134 ;
181182 inline static const SchemaField kContent = SchemaField::MakeOptional(
182- 134 , " content" , iceberg:: int32(),
183+ kContentFieldId , " content" , int32(),
183184 " Contents of the file: 0=data, 1=position deletes, 2=equality deletes" );
185+
186+ inline static constexpr int32_t kFilePathFieldId = 100 ;
184187 inline static const SchemaField kFilePath = SchemaField::MakeRequired(
185- 100 , " file_path" , iceberg::string(), " Location URI with FS scheme" );
186- inline static const SchemaField kFileFormat = SchemaField::MakeRequired(
187- 101 , " file_format" , iceberg::string(), " File format name: avro, orc, or parquet" );
188- inline static const int32_t kPartitionFieldId = 102 ;
188+ kFilePathFieldId , " file_path" , string(), " Location URI with FS scheme" );
189+
190+ inline static constexpr int32_t kFileFormatFieldId = 101 ;
191+ inline static const SchemaField kFileFormat =
192+ SchemaField::MakeRequired (kFileFormatFieldId , " file_format" , string(),
193+ "File format name: avro, orc, or parquet");
194+
195+ inline static constexpr int32_t kPartitionFieldId = 102 ;
189196 inline static const std::string kPartitionField = " partition" ;
190197 inline static const std::string kPartitionDoc =
191198 " Partition data tuple, schema based on the partition spec" ;
199+
200+ inline static constexpr int32_t kRecordCountFieldId = 103 ;
192201 inline static const SchemaField kRecordCount = SchemaField::MakeRequired(
193- 103 , " record_count" , iceberg::int64(), " Number of records in the file" );
202+ kRecordCountFieldId , " record_count" , int64(), " Number of records in the file" );
203+
204+ inline static constexpr int32_t kFileSizeFieldId = 104 ;
194205 inline static const SchemaField kFileSize = SchemaField::MakeRequired(
195- 104 , " file_size_in_bytes" , iceberg::int64(), " Total file size in bytes" );
206+ kFileSizeFieldId , " file_size_in_bytes" , int64(), " Total file size in bytes" );
207+
208+ inline static constexpr int32_t kColumnSizesFieldId = 108 ;
196209 inline static const SchemaField kColumnSizes = SchemaField::MakeOptional(
197- 108 , " column_sizes" ,
198- std::make_shared<MapType>(
199- SchemaField::MakeRequired (117 , std::string(MapType::kKeyName ),
200- iceberg::int32()),
201- SchemaField::MakeRequired(118 , std::string(MapType::kValueName ),
202- iceberg::int64())),
210+ kColumnSizesFieldId , " column_sizes" ,
211+ map (SchemaField::MakeRequired(117 , std::string(MapType::kKeyName ), int32()),
212+ SchemaField::MakeRequired(118 , std::string(MapType::kValueName ), int64())),
203213 "Map of column id to total size on disk");
214+
215+ inline static constexpr int32_t kValueCountsFieldId = 109 ;
204216 inline static const SchemaField kValueCounts = SchemaField::MakeOptional(
205- 109 , " value_counts" ,
206- std::make_shared<MapType>(
207- SchemaField::MakeRequired (119 , std::string(MapType::kKeyName ),
208- iceberg::int32()),
209- SchemaField::MakeRequired(120 , std::string(MapType::kValueName ),
210- iceberg::int64())),
217+ kValueCountsFieldId , " value_counts" ,
218+ map (SchemaField::MakeRequired(119 , std::string(MapType::kKeyName ), int32()),
219+ SchemaField::MakeRequired(120 , std::string(MapType::kValueName ), int64())),
211220 "Map of column id to total count, including null and NaN");
221+
222+ inline static constexpr int32_t kNullValueCountsFieldId = 110 ;
212223 inline static const SchemaField kNullValueCounts = SchemaField::MakeOptional(
213- 110 , " null_value_counts" ,
214- std::make_shared<MapType>(
215- SchemaField::MakeRequired (121 , std::string(MapType::kKeyName ),
216- iceberg::int32()),
217- SchemaField::MakeRequired(122 , std::string(MapType::kValueName ),
218- iceberg::int64())),
224+ kNullValueCountsFieldId , " null_value_counts" ,
225+ map (SchemaField::MakeRequired(121 , std::string(MapType::kKeyName ), int32()),
226+ SchemaField::MakeRequired(122 , std::string(MapType::kValueName ), int64())),
219227 "Map of column id to null value count");
228+
229+ inline static constexpr int32_t kNanValueCountsFieldId = 137 ;
220230 inline static const SchemaField kNanValueCounts = SchemaField::MakeOptional(
221- 137 , " nan_value_counts" ,
222- std::make_shared<MapType>(
223- SchemaField::MakeRequired (138 , std::string(MapType::kKeyName ),
224- iceberg::int32()),
225- SchemaField::MakeRequired(139 , std::string(MapType::kValueName ),
226- iceberg::int64())),
231+ kNanValueCountsFieldId , " nan_value_counts" ,
232+ map (SchemaField::MakeRequired(138 , std::string(MapType::kKeyName ), int32()),
233+ SchemaField::MakeRequired(139 , std::string(MapType::kValueName ), int64())),
227234 "Map of column id to number of NaN values in the column");
235+
236+ inline static constexpr int32_t kLowerBoundsFieldId = 125 ;
228237 inline static const SchemaField kLowerBounds = SchemaField::MakeOptional(
229- 125 , " lower_bounds" ,
230- std::make_shared<MapType>(
231- SchemaField::MakeRequired (126 , std::string(MapType::kKeyName ),
232- iceberg::int32()),
233- SchemaField::MakeRequired(127 , std::string(MapType::kValueName ),
234- iceberg::binary())),
238+ kLowerBoundsFieldId , " lower_bounds" ,
239+ map (SchemaField::MakeRequired(126 , std::string(MapType::kKeyName ), int32()),
240+ SchemaField::MakeRequired(127 , std::string(MapType::kValueName ), binary())),
235241 "Map of column id to lower bound");
242+
243+ inline static constexpr int32_t kUpperBoundsFieldId = 128 ;
236244 inline static const SchemaField kUpperBounds = SchemaField::MakeOptional(
237- 128 , " upper_bounds" ,
238- std::make_shared<MapType>(
239- SchemaField::MakeRequired (129 , std::string(MapType::kKeyName ),
240- iceberg::int32()),
241- SchemaField::MakeRequired(130 , std::string(MapType::kValueName ),
242- iceberg::binary())),
245+ kUpperBoundsFieldId , " upper_bounds" ,
246+ map (SchemaField::MakeRequired(129 , std::string(MapType::kKeyName ), int32()),
247+ SchemaField::MakeRequired(130 , std::string(MapType::kValueName ), binary())),
243248 "Map of column id to upper bound");
249+
250+ inline static constexpr int32_t kKeyMetadataFieldId = 131 ;
244251 inline static const SchemaField kKeyMetadata = SchemaField::MakeOptional(
245- 131 , " key_metadata" , iceberg::binary(), " Encryption key metadata blob" );
252+ kKeyMetadataFieldId , " key_metadata" , binary(), " Encryption key metadata blob" );
253+
254+ inline static constexpr int32_t kSplitOffsetsFieldId = 132 ;
246255 inline static const SchemaField kSplitOffsets = SchemaField::MakeOptional(
247- 132 , " split_offsets" ,
248- std::make_shared<ListType>(SchemaField::MakeRequired(
249- 133 , std::string(ListType::kElementName ), iceberg::int64())),
256+ kSplitOffsetsFieldId , " split_offsets" ,
257+ list (SchemaField::MakeRequired(133 , std::string(ListType::kElementName ), int64())),
250258 "Splittable offsets");
259+
260+ inline static constexpr int32_t kEqualityIdsFieldId = 135 ;
251261 inline static const SchemaField kEqualityIds = SchemaField::MakeOptional(
252- 135 , " equality_ids" ,
253- std::make_shared<ListType>(SchemaField::MakeRequired(
254- 136 , std::string(ListType::kElementName ), iceberg::int32())),
262+ kEqualityIdsFieldId , " equality_ids" ,
263+ list (SchemaField::MakeRequired(136 , std::string(ListType::kElementName ), int32())),
255264 "Equality comparison field IDs");
256- inline static const SchemaField kSortOrderId =
257- SchemaField::MakeOptional (140 , " sort_order_id" , iceberg::int32(), "Sort order ID");
258- inline static const SchemaField kFirstRowId = SchemaField::MakeOptional(
259- 142 , " first_row_id" , iceberg::int64(), " Starting row ID to assign to new rows" );
265+
266+ inline static constexpr int32_t kSortOrderIdFieldId = 140 ;
267+ inline static const SchemaField kSortOrderId = SchemaField::MakeOptional(
268+ kSortOrderIdFieldId , " sort_order_id" , int32(), " Sort order ID" );
269+
270+ inline static constexpr int32_t kFirstRowIdFieldId = 142 ;
271+ inline static const SchemaField kFirstRowId =
272+ SchemaField::MakeOptional (kFirstRowIdFieldId , " first_row_id" , int64(),
273+ "Starting row ID to assign to new rows");
274+
275+ inline static constexpr int32_t kReferencedDataFileFieldId = 143 ;
260276 inline static const SchemaField kReferencedDataFile = SchemaField::MakeOptional(
261- 143 , " referenced_data_file" , iceberg:: string(),
277+ kReferencedDataFileFieldId , " referenced_data_file" , string(),
262278 " Fully qualified location (URI with FS scheme) of a data file that all deletes "
263279 " reference" );
280+
281+ inline static constexpr int32_t kContentOffsetFieldId = 144 ;
264282 inline static const SchemaField kContentOffset =
265- SchemaField::MakeOptional (144 , " content_offset" , iceberg:: int64(),
283+ SchemaField::MakeOptional (kContentOffsetFieldId , " content_offset" , int64(),
266284 "The offset in the file where the content starts");
285+
286+ inline static constexpr int32_t kContentSizeFieldId = 145 ;
267287 inline static const SchemaField kContentSize =
268- SchemaField::MakeOptional (145 , " content_size_in_bytes" , iceberg:: int64(),
288+ SchemaField::MakeOptional (kContentSizeFieldId , " content_size_in_bytes" , int64(),
269289 "The length of referenced content stored in the file");
270290
271291 bool operator ==(const DataFile& other) const = default ;
@@ -298,16 +318,24 @@ struct ICEBERG_EXPORT ManifestEntry {
298318 // / File path, partition tuple, metrics, ...
299319 std::shared_ptr<DataFile> data_file;
300320
321+ inline static constexpr int32_t kStatusFieldId = 0 ;
301322 inline static const SchemaField kStatus =
302- SchemaField::MakeRequired (0 , " status" , iceberg::int32());
323+ SchemaField::MakeRequired (kStatusFieldId , " status" , int32());
324+
325+ inline static constexpr int32_t kSnapshotIdFieldId = 1 ;
303326 inline static const SchemaField kSnapshotId =
304- SchemaField::MakeOptional (1 , " snapshot_id" , iceberg::int64());
327+ SchemaField::MakeOptional (kSnapshotIdFieldId , " snapshot_id" , int64());
328+
305329 inline static const int32_t kDataFileFieldId = 2 ;
306330 inline static const std::string kDataFileField = " data_file" ;
331+
332+ inline static constexpr int32_t kSequenceNumberFieldId = 3 ;
307333 inline static const SchemaField kSequenceNumber =
308- SchemaField::MakeOptional (3 , " sequence_number" , iceberg::int64());
309- inline static const SchemaField kFileSequenceNumber =
310- SchemaField::MakeOptional (4 , " file_sequence_number" , iceberg::int64());
334+ SchemaField::MakeOptional (kSequenceNumberFieldId , " sequence_number" , int64());
335+
336+ inline static constexpr int32_t kFileSequenceNumberFieldId = 4 ;
337+ inline static const SchemaField kFileSequenceNumber = SchemaField::MakeOptional(
338+ kFileSequenceNumberFieldId , " file_sequence_number" , int64());
311339
312340 // / \brief Check if this manifest entry is deleted.
313341 constexpr bool IsAlive () const {
0 commit comments