Skip to content

Commit 1ef5239

Browse files
committed
add test
1 parent e9c1385 commit 1ef5239

File tree

1 file changed

+35
-37
lines changed

1 file changed

+35
-37
lines changed

test/manifest_list_reader_test.cc

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#include "iceberg/arrow/arrow_fs_file_io_internal.h"
2525
#include "iceberg/avro/avro_reader.h"
26+
#include "iceberg/expression/literal.h"
2627
#include "iceberg/manifest_list.h"
2728
#include "iceberg/manifest_reader.h"
2829
#include "temp_file_test_base.h"
@@ -76,43 +77,40 @@ class ManifestListReaderV1Test : public ManifestListReaderTestBase {
7677
std::vector<int64_t> file_size = {6185, 6113};
7778
std::vector<int64_t> snapshot_id = {7532614258660258098, 7532614258660258098};
7879

79-
std::vector<std::vector<std::uint8_t>> lower_bounds = {
80-
{0x32, 0x30, 0x32, 0x32, 0x2D, 0x30, 0x32, 0x2D, 0x32, 0x32},
81-
{0x32, 0x30, 0x32, 0x32, 0x2D, 0x32, 0x2D, 0x32, 0x32}};
82-
83-
std::vector<std::vector<std::uint8_t>> upper_bounds = {
84-
{0x32, 0x30, 0x32, 0x32, 0x2D, 0x32, 0x2D, 0x32, 0x33},
85-
{0x32, 0x30, 0x32, 0x32, 0x2D, 0x32, 0x2D, 0x32, 0x33}};
86-
87-
return {{.manifest_path = paths[0],
88-
.manifest_length = file_size[0],
89-
.partition_spec_id = 0,
90-
.added_snapshot_id = snapshot_id[0],
91-
.added_files_count = 4,
92-
.existing_files_count = 0,
93-
.deleted_files_count = 0,
94-
.added_rows_count = 6,
95-
.existing_rows_count = 0,
96-
.deleted_rows_count = 0,
97-
.partitions = {{.contains_null = false,
98-
.contains_nan = false,
99-
.lower_bound = lower_bounds[0],
100-
.upper_bound = upper_bounds[0]}}},
101-
102-
{.manifest_path = paths[1],
103-
.manifest_length = file_size[1],
104-
.partition_spec_id = 0,
105-
.added_snapshot_id = snapshot_id[1],
106-
.added_files_count = 0,
107-
.existing_files_count = 0,
108-
.deleted_files_count = 2,
109-
.added_rows_count = 0,
110-
.existing_rows_count = 0,
111-
.deleted_rows_count = 6,
112-
.partitions = {{.contains_null = false,
113-
.contains_nan = false,
114-
.lower_bound = lower_bounds[1],
115-
.upper_bound = upper_bounds[1]}}}};
80+
return {
81+
{.manifest_path = paths[0],
82+
.manifest_length = file_size[0],
83+
.partition_spec_id = 0,
84+
.added_snapshot_id = snapshot_id[0],
85+
.added_files_count = 4,
86+
.existing_files_count = 0,
87+
.deleted_files_count = 0,
88+
.added_rows_count = 6,
89+
.existing_rows_count = 0,
90+
.deleted_rows_count = 0,
91+
.partitions = {{.contains_null = false,
92+
.contains_nan = false,
93+
.lower_bound =
94+
iceberg::Literal::String("2022-02-22").Serialize().value(),
95+
.upper_bound =
96+
iceberg::Literal::String("2022-2-23").Serialize().value()}}},
97+
98+
{.manifest_path = paths[1],
99+
.manifest_length = file_size[1],
100+
.partition_spec_id = 0,
101+
.added_snapshot_id = snapshot_id[1],
102+
.added_files_count = 0,
103+
.existing_files_count = 0,
104+
.deleted_files_count = 2,
105+
.added_rows_count = 0,
106+
.existing_rows_count = 0,
107+
.deleted_rows_count = 6,
108+
.partitions = {
109+
{.contains_null = false,
110+
.contains_nan = false,
111+
.lower_bound = iceberg::Literal::String("2022-2-22").Serialize().value(),
112+
.upper_bound =
113+
iceberg::Literal::String("2022-2-23").Serialize().value()}}}};
116114
}
117115

118116
std::vector<ManifestFile> PrepareComplexTypeTestData() {

0 commit comments

Comments
 (0)