Skip to content

Commit 75141cd

Browse files
author
xiao.dong
committed
fix partition spec init
1 parent eaa00d4 commit 75141cd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/iceberg/manifest_entry.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "iceberg/expression/literal.h"
3030
#include "iceberg/file_format.h"
3131
#include "iceberg/iceberg_export.h"
32+
#include "iceberg/partition_spec.h"
3233
#include "iceberg/result.h"
3334
#include "iceberg/schema_field.h"
3435
#include "iceberg/type.h"
@@ -146,7 +147,7 @@ struct ICEBERG_EXPORT DataFile {
146147
std::optional<int32_t> sort_order_id;
147148
/// This field is not included in spec, so it is not serialized into the manifest file.
148149
/// It is just store in memory representation used in process.
149-
int32_t partition_spec_id = 0;
150+
int32_t partition_spec_id = PartitionSpec::kInitialSpecId;
150151
/// Field id: 142
151152
/// The _row_id for the first row in the data file.
152153
///

src/iceberg/manifest_list.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <utility>
2929

3030
#include "iceberg/iceberg_export.h"
31+
#include "iceberg/partition_spec.h"
3132
#include "iceberg/result.h"
3233
#include "iceberg/schema_field.h"
3334
#include "iceberg/snapshot.h"
@@ -91,7 +92,7 @@ struct ICEBERG_EXPORT ManifestFile {
9192
/// Field id: 502
9293
/// ID of a partition spec used to write the manifest; must be listed in table metadata
9394
/// partition-specs
94-
int32_t partition_spec_id = 0;
95+
int32_t partition_spec_id = PartitionSpec::kInitialSpecId;
9596
/// Field id: 517
9697
/// The type of files tracked by the manifest, either data or delete files; 0 for all v1
9798
/// manifests

0 commit comments

Comments
 (0)