@@ -190,57 +190,78 @@ struct ICEBERG_EXPORT DataFile {
190190 // / present
191191 std::optional<int64_t > content_size_in_bytes;
192192
193- inline static const SchemaField kContent = MakeRequiredField<IntType>(134 , " content" );
193+ inline static const SchemaField kContent =
194+ SchemaField::MakeRequired (134 , " content" , std::make_shared<IntType>());
194195 inline static const SchemaField kFilePath =
195- MakeRequiredField<StringType> (100 , " file_path" );
196+ SchemaField::MakeRequired (100 , " file_path" , std::make_shared<StringType>() );
196197 inline static const SchemaField kFileFormat =
197- MakeRequiredField<IntType> (101 , " file_format" );
198+ SchemaField::MakeRequired (101 , " file_format" , std::make_shared<IntType>() );
198199 inline static const SchemaField kRecordCount =
199- MakeRequiredField<LongType> (103 , " record_count" );
200+ SchemaField::MakeRequired (103 , " record_count" , std::make_shared<LongType>() );
200201 inline static const SchemaField kFileSize =
201- MakeRequiredField<LongType> (104 , " file_size_in_bytes" );
202- inline static const SchemaField kColumnSizes = MakeOptionalField<MapType> (
202+ SchemaField::MakeRequired (104 , " file_size_in_bytes" , std::make_shared<LongType>() );
203+ inline static const SchemaField kColumnSizes = SchemaField::MakeOptional (
203204 108 , " column_sizes" ,
204- MakeRequiredField<IntType>(117 , std::string(MapType::kKeyName )),
205- MakeRequiredField<LongType>(118 , std::string(MapType::kValueName )));
206- inline static const SchemaField kValueCounts = MakeOptionalField<MapType>(
205+ std::make_shared<MapType>(
206+ SchemaField::MakeRequired (117 , std::string(MapType::kKeyName ),
207+ std::make_shared<IntType>()),
208+ SchemaField::MakeRequired(118 , std::string(MapType::kValueName ),
209+ std::make_shared<LongType>())));
210+ inline static const SchemaField kValueCounts = SchemaField::MakeOptional(
207211 109 , " value_counts" ,
208- MakeRequiredField<IntType>(119 , std::string(MapType::kKeyName )),
209- MakeRequiredField<LongType>(120 , std::string(MapType::kValueName )));
210- inline static const SchemaField kNullValueCounts = MakeOptionalField<MapType>(
212+ std::make_shared<MapType>(
213+ SchemaField::MakeRequired (119 , std::string(MapType::kKeyName ),
214+ std::make_shared<IntType>()),
215+ SchemaField::MakeRequired(120 , std::string(MapType::kValueName ),
216+ std::make_shared<LongType>())));
217+ inline static const SchemaField kNullValueCounts = SchemaField::MakeOptional(
211218 110 , " null_value_counts" ,
212- MakeRequiredField<IntType>(121 , std::string(MapType::kKeyName )),
213- MakeRequiredField<LongType>(122 , std::string(MapType::kValueName )));
214- inline static const SchemaField kNanValueCounts = MakeOptionalField<MapType>(
219+ std::make_shared<MapType>(
220+ SchemaField::MakeRequired (121 , std::string(MapType::kKeyName ),
221+ std::make_shared<IntType>()),
222+ SchemaField::MakeRequired(122 , std::string(MapType::kValueName ),
223+ std::make_shared<LongType>())));
224+ inline static const SchemaField kNanValueCounts = SchemaField::MakeOptional(
215225 137 , " nan_value_counts" ,
216- MakeRequiredField<IntType>(138 , std::string(MapType::kKeyName )),
217- MakeRequiredField<LongType>(139 , std::string(MapType::kValueName )));
218- inline static const SchemaField kLowerBounds = MakeOptionalField<MapType>(
226+ std::make_shared<MapType>(
227+ SchemaField::MakeRequired (138 , std::string(MapType::kKeyName ),
228+ std::make_shared<IntType>()),
229+ SchemaField::MakeRequired(139 , std::string(MapType::kValueName ),
230+ std::make_shared<LongType>())));
231+ inline static const SchemaField kLowerBounds = SchemaField::MakeOptional(
219232 125 , " lower_bounds" ,
220- MakeRequiredField<IntType>(126 , std::string(MapType::kKeyName )),
221- MakeRequiredField<BinaryType>(127 , std::string(MapType::kValueName )));
222- inline static const SchemaField kUpperBounds = MakeOptionalField<MapType>(
233+ std::make_shared<MapType>(
234+ SchemaField::MakeRequired (126 , std::string(MapType::kKeyName ),
235+ std::make_shared<IntType>()),
236+ SchemaField::MakeRequired(127 , std::string(MapType::kValueName ),
237+ std::make_shared<BinaryType>())));
238+ inline static const SchemaField kUpperBounds = SchemaField::MakeOptional(
223239 128 , " upper_bounds" ,
224- MakeRequiredField<IntType>(129 , std::string(MapType::kKeyName )),
225- MakeRequiredField<BinaryType>(130 , std::string(MapType::kValueName )));
240+ std::make_shared<MapType>(
241+ SchemaField::MakeRequired (129 , std::string(MapType::kKeyName ),
242+ std::make_shared<IntType>()),
243+ SchemaField::MakeRequired(130 , std::string(MapType::kValueName ),
244+ std::make_shared<BinaryType>())));
226245 inline static const SchemaField kKeyMetadata =
227- MakeOptionalField<BinaryType> (131 , " key_metadata" );
228- inline static const SchemaField kSplitOffsets = MakeOptionalField<ListType> (
246+ SchemaField::MakeOptional (131 , " key_metadata" , std::make_shared<BinaryType>() );
247+ inline static const SchemaField kSplitOffsets = SchemaField::MakeOptional (
229248 132 , " split_offsets" ,
230- MakeRequiredField<LongType>(133 , std::string(ListType::kElementName )));
231- inline static const SchemaField kEqualityIds = MakeOptionalField<ListType>(
249+ std::make_shared<ListType>(SchemaField::MakeRequired(
250+ 133 , std::string(ListType::kElementName ), std::make_shared<LongType>())));
251+ inline static const SchemaField kEqualityIds = SchemaField::MakeOptional(
232252 135 , " equality_ids" ,
233- MakeRequiredField<IntType>(136 , std::string(ListType::kElementName )));
253+ std::make_shared<ListType>(SchemaField::MakeRequired(
254+ 136 , std::string(ListType::kElementName ), std::make_shared<IntType>())));
234255 inline static const SchemaField kSortOrderId =
235- MakeOptionalField<IntType> (140 , " sort_order_id" );
256+ SchemaField::MakeOptional (140 , " sort_order_id" , std::make_shared<IntType>() );
236257 inline static const SchemaField kFirstRowId =
237- MakeOptionalField<LongType> (142 , " first_row_id" );
238- inline static const SchemaField kReferencedDataFile =
239- MakeOptionalField<StringType>( 143 , " referenced_data_file" );
258+ SchemaField::MakeOptional (142 , " first_row_id" , std::make_shared<LongType>() );
259+ inline static const SchemaField kReferencedDataFile = SchemaField::MakeOptional(
260+ 143 , " referenced_data_file" , std::make_shared<StringType>() );
240261 inline static const SchemaField kContentOffset =
241- MakeOptionalField<LongType> (144 , " content_offset" );
242- inline static const SchemaField kContentSize =
243- MakeOptionalField<LongType>( 145 , " content_size_in_bytes" );
262+ SchemaField::MakeOptional (144 , " content_offset" , std::make_shared<LongType>() );
263+ inline static const SchemaField kContentSize = SchemaField::MakeOptional(
264+ 145 , " content_size_in_bytes" , std::make_shared<LongType>() );
244265
245266 static std::shared_ptr<StructType> Type (std::shared_ptr<StructType> partition_type);
246267};
@@ -269,13 +290,14 @@ struct ICEBERG_EXPORT ManifestEntry {
269290 // / File path, partition tuple, metrics, ...
270291 DataFile data_file;
271292
272- inline static const SchemaField kStatus = MakeRequiredField<IntType>(0 , " status" );
293+ inline static const SchemaField kStatus =
294+ SchemaField::MakeRequired (0 , " status" , std::make_shared<IntType>());
273295 inline static const SchemaField kSnapshotId =
274- MakeOptionalField<LongType> (1 , " snapshot_id" );
296+ SchemaField::MakeOptional (1 , " snapshot_id" , std::make_shared<LongType>() );
275297 inline static const SchemaField kSequenceNumber =
276- MakeOptionalField<LongType> (3 , " sequence_number" );
298+ SchemaField::MakeOptional (3 , " sequence_number" , std::make_shared<LongType>() );
277299 inline static const SchemaField kFileSequenceNumber =
278- MakeOptionalField<LongType> (4 , " file_sequence_number" );
300+ SchemaField::MakeOptional (4 , " file_sequence_number" , std::make_shared<LongType>() );
279301
280302 static std::shared_ptr<StructType> TypeFromPartitionType (
281303 std::shared_ptr<StructType> partition_type);
0 commit comments