@@ -84,7 +84,7 @@ static void PackedRead(benchmark::State& st, arrow::fs::FileSystem* fs, const st
84
84
85
85
auto paths = std::vector<std::string>{path + " /0" , path + " /1" };
86
86
87
- // after writing, the column of large_str is in 0th file, and the last int64 columns are in 1st file
87
+ // after writing, the pk and the ts are in the first file, and the large str is in the second file
88
88
std::vector<std::shared_ptr<arrow::Field>> fields = {
89
89
arrow::field (" int" , arrow::utf8 ()),
90
90
arrow::field (" int64" , arrow::int32 ()),
@@ -93,7 +93,7 @@ static void PackedRead(benchmark::State& st, arrow::fs::FileSystem* fs, const st
93
93
auto schema = arrow::schema (fields);
94
94
95
95
for (auto _ : st) {
96
- PackedRecordBatchReader pr (*fs, paths , schema, column_offsets , needed_columns, buffer_size);
96
+ PackedRecordBatchReader pr (*fs, path , schema, needed_columns, buffer_size);
97
97
auto r = arrow::RecordBatch::MakeEmpty (schema);
98
98
SKIP_IF_NOT_OK (r.status (), st)
99
99
auto rb = r.ValueOrDie ();
@@ -107,7 +107,10 @@ static void PackedRead(benchmark::State& st, arrow::fs::FileSystem* fs, const st
107
107
}
108
108
}
109
109
110
- static void PackedWrite (benchmark::State& st, arrow::fs::FileSystem* fs, const std::string& path, size_t buffer_size) {
110
+ static void PackedWrite (benchmark::State& st,
111
+ std::shared_ptr<arrow::fs::FileSystem> fs,
112
+ std::string& path,
113
+ size_t buffer_size) {
111
114
auto schema = arrow::schema ({arrow::field (" int32" , arrow::int32 ()), arrow::field (" int64" , arrow::int64 ()),
112
115
arrow::field (" str" , arrow::utf8 ())});
113
116
arrow::Int32Builder int_builder;
@@ -134,7 +137,7 @@ static void PackedWrite(benchmark::State& st, arrow::fs::FileSystem* fs, const s
134
137
auto conf = StorageConfig ();
135
138
conf.use_custom_part_upload_size = true ;
136
139
conf.part_size = 30 * 1024 * 1024 ;
137
- PackedRecordBatchWriter writer (buffer_size, schema, * fs, path, conf, * parquet::default_writer_properties () );
140
+ PackedRecordBatchWriter writer (buffer_size, schema, fs, path, conf);
138
141
for (int i = 0 ; i < 8 * 1024 ; ++i) {
139
142
auto r = writer.Write (record_batch);
140
143
if (!r.ok ()) {
@@ -153,7 +156,7 @@ std::string PATH = "/tmp/bench/foo";
153
156
154
157
BENCHMARK_DEFINE_F (S3Fixture, Write32MB)(benchmark::State& st) {
155
158
SKIP_IF_NOT_OK (fs_->CreateDir (PATH), st);
156
- PackedWrite (st, fs_. get () , PATH, 22 * 1024 * 1024 );
159
+ PackedWrite (st, fs_, PATH, 22 * 1024 * 1024 );
157
160
}
158
161
BENCHMARK_REGISTER_F (S3Fixture, Write32MB)->UseRealTime ();
159
162
0 commit comments