47 bool contains_null =
true;
62 "True if any file has a null partition value");
65 "True if any file has a nan partition value");
66 inline static const SchemaField kLowerBound = SchemaField::MakeOptional(
67 510,
"lower_bound",
iceberg::binary(),
"Partition lower bound for all files");
68 inline static const SchemaField kUpperBound = SchemaField::MakeOptional(
69 511,
"upper_bound",
iceberg::binary(),
"Partition upper bound for all files");
73 static const std::shared_ptr<StructType>&
Type();
92 int64_t manifest_length = 0;
96 int32_t partition_spec_id = PartitionSpec::kInitialSpecId;
104 int64_t sequence_number = TableMetadata::kInitialSequenceNumber;
108 int64_t min_sequence_number = TableMetadata::kInitialSequenceNumber;
159 static constexpr int32_t kManifestPathFieldId = 500;
160 inline static const SchemaField kManifestPath = SchemaField::MakeRequired(
161 kManifestPathFieldId,
"manifest_path",
string(),
"Location URI with FS scheme");
163 static constexpr int32_t kManifestLengthFieldId = 501;
164 inline static const SchemaField kManifestLength = SchemaField::MakeRequired(
165 kManifestLengthFieldId,
"manifest_length",
int64(),
"Total file size in bytes");
167 static constexpr int32_t kPartitionSpecIdFieldId = 502;
168 inline static const SchemaField kPartitionSpecId = SchemaField::MakeRequired(
169 kPartitionSpecIdFieldId,
"partition_spec_id",
int32(),
"Spec ID used to write");
171 static constexpr int32_t kContentFieldId = 517;
172 inline static const SchemaField kContent = SchemaField::MakeOptional(
173 kContentFieldId,
"content",
int32(),
"Contents of the manifest: 0=data, 1=deletes");
175 static constexpr int32_t kSequenceNumberFieldId = 515;
177 SchemaField::MakeOptional(kSequenceNumberFieldId,
"sequence_number",
int64(),
178 "Sequence number when the manifest was added");
180 static constexpr int32_t kMinSequenceNumberFieldId = 516;
181 inline static const SchemaField kMinSequenceNumber =
182 SchemaField::MakeOptional(kMinSequenceNumberFieldId,
"min_sequence_number",
int64(),
183 "Lowest sequence number in the manifest");
185 static constexpr int32_t kAddedSnapshotIdFieldId = 503;
187 SchemaField::MakeRequired(kAddedSnapshotIdFieldId,
"added_snapshot_id",
int64(),
188 "Snapshot ID that added the manifest");
190 static constexpr int32_t kAddedFilesCountFieldId = 504;
191 inline static const SchemaField kAddedFilesCount = SchemaField::MakeOptional(
192 kAddedFilesCountFieldId,
"added_files_count",
int32(),
"Added entry count");
194 static constexpr int32_t kExistingFilesCountFieldId = 505;
195 inline static const SchemaField kExistingFilesCount =
196 SchemaField::MakeOptional(kExistingFilesCountFieldId,
"existing_files_count",
197 int32(),
"Existing entry count");
199 static constexpr int32_t kDeletedFilesCountFieldId = 506;
200 inline static const SchemaField kDeletedFilesCount = SchemaField::MakeOptional(
201 kDeletedFilesCountFieldId,
"deleted_files_count",
int32(),
"Deleted entry count");
203 static constexpr int32_t kAddedRowsCountFieldId = 512;
204 inline static const SchemaField kAddedRowsCount = SchemaField::MakeOptional(
205 kAddedRowsCountFieldId,
"added_rows_count",
int64(),
"Added rows count");
207 static constexpr int32_t kExistingRowsCountFieldId = 513;
208 inline static const SchemaField kExistingRowsCount = SchemaField::MakeOptional(
209 kExistingRowsCountFieldId,
"existing_rows_count",
int64(),
"Existing rows count");
211 static constexpr int32_t kDeletedRowsCountFieldId = 514;
212 inline static const SchemaField kDeletedRowsCount = SchemaField::MakeOptional(
213 kDeletedRowsCountFieldId,
"deleted_rows_count",
int64(),
"Deleted rows count");
215 static constexpr int32_t kPartitionSummaryFieldId = 507;
216 inline static const SchemaField kPartitions = SchemaField::MakeOptional(
217 kPartitionSummaryFieldId,
"partitions",
218 list(SchemaField::MakeRequired(508, std::string(ListType::kElementName),
220 PartitionFieldSummary::kContainsNull,
221 PartitionFieldSummary::kContainsNaN,
222 PartitionFieldSummary::kLowerBound,
223 PartitionFieldSummary::kUpperBound,
225 "Summary for each partition");
227 static constexpr int32_t kKeyMetadataFieldId = 519;
228 inline static const SchemaField kKeyMetadata = SchemaField::MakeOptional(
229 kKeyMetadataFieldId,
"key_metadata", binary(),
"Encryption key metadata blob");
231 static constexpr int32_t kFirstRowIdFieldId = 520;
232 inline static const SchemaField kFirstRowId = SchemaField::MakeOptional(
233 kFirstRowIdFieldId,
"first_row_id", int64(),
234 "Starting row ID to assign to new rows in ADDED data files");
236 bool operator==(
const ManifestFile& other)
const {
237 return manifest_path == other.manifest_path;
240 static const std::shared_ptr<StructType>& Type();
273 std::string_view str)
noexcept {
276 return InvalidArgument(
"Invalid manifest content type: {}", str);
281 int32_t content)
noexcept {
288 return InvalidArgument(
"Invalid manifest content type: {}", content);
298 return std::hash<std::string>{}(manifest_file.
manifest_path);
A type combined with a name.
Definition schema_field.h:39
Interface for a data type for a field.
Definition type.h:44
Definition expected.h:1199
ICEBERG_EXPORT const std::shared_ptr< BinaryType > & binary()
Return a BinaryType instance.
ICEBERG_EXPORT std::shared_ptr< ListType > list(SchemaField element)
Create a ListType with the given element field.
ICEBERG_EXPORT const std::shared_ptr< IntType > & int32()
Return an IntType instance.
ICEBERG_EXPORT std::shared_ptr< StructType > struct_(std::vector< SchemaField > fields)
Create a StructType with the given fields.
ICEBERG_EXPORT const std::shared_ptr< BooleanType > & boolean()
Return a BooleanType instance.
ICEBERG_EXPORT const std::shared_ptr< LongType > & int64()
Return a LongType instance.
Define symbol visibility macros for core Iceberg APIs.
Core Apache Iceberg C++ APIs.
Definition arrow_io_util.h:34
ManifestContent
The type of files tracked by the manifest, either data or delete files; 0 for all v1 manifests.
Definition manifest_list.h:78
@ kData
The manifest content is data.
@ kDeletes
The manifest content is deletes.
ICEBERG_EXPORT std::string_view ToString(Expression::Operation op)
Returns a string representation of an expression operation.
void unreachable() noexcept
Marks a branch the program can never take.
Definition unreachable.h:35
ICEBERG_EXPORT constexpr Result< ManifestContent > ManifestContentFromInt(int32_t content) noexcept
Get the relative manifest content type from int.
Definition manifest_list.h:280
ICEBERG_EXPORT constexpr Result< ManifestContent > ManifestContentFromString(std::string_view str) noexcept
Get the relative manifest content type from name.
Definition manifest_list.h:272
Define Result, Status, and error helpers.
Entry in a manifest list.
Definition manifest_list.h:86
std::vector< PartitionFieldSummary > partitions
Definition manifest_list.h:142
std::optional< int64_t > deleted_rows_count
Definition manifest_list.h:137
std::vector< uint8_t > key_metadata
Definition manifest_list.h:145
std::optional< int32_t > existing_files_count
Definition manifest_list.h:121
bool has_existing_files() const
Checks if this manifest file contains entries with EXISTING status.
Definition manifest_list.h:154
std::optional< int64_t > added_snapshot_id
Definition manifest_list.h:113
std::optional< int64_t > added_rows_count
Definition manifest_list.h:129
std::optional< int64_t > first_row_id
Definition manifest_list.h:148
std::string manifest_path
Definition manifest_list.h:89
std::optional< int32_t > added_files_count
Definition manifest_list.h:117
std::optional< int32_t > deleted_files_count
Definition manifest_list.h:125
bool has_added_files() const
Checks if this manifest file contains entries with ADDED status.
Definition manifest_list.h:151
std::optional< int64_t > existing_rows_count
Definition manifest_list.h:133
bool has_deleted_files() const
Checks if this manifest file contains entries with DELETED status.
Definition manifest_list.h:157
Definition manifest_list.h:255
std::vector< ManifestFile > entries
Entries in a manifest list.
Definition manifest_list.h:257
Field summary for partition field in the spec.
Definition manifest_list.h:44
std::optional< std::vector< uint8_t > > lower_bound
Definition manifest_list.h:54
std::optional< std::vector< uint8_t > > upper_bound
Definition manifest_list.h:58
std::optional< bool > contains_nan
Definition manifest_list.h:50
Portable stand-in for std::unreachable.