Skip to content

Commit 30d1559

Browse files
committed
fix review
1 parent a036f82 commit 30d1559

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/iceberg/parquet/parquet_writer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class ParquetWriter::Impl {
120120
// Parquet file writer to write ArrowArray.
121121
std::unique_ptr<::parquet::arrow::FileWriter> writer_;
122122
// Total length of the written Parquet file.
123-
int64_t total_bytes_;
123+
int64_t total_bytes_{0};
124124
// Row group start offsets in the Parquet file.
125125
std::vector<int64_t> split_offsets_;
126126
};

test/parquet_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace iceberg::parquet {
4848

4949
namespace {
5050

51-
Status WriteArrayInner(Writer& writer, std::shared_ptr<::arrow::Array> data) {
51+
Status WriteArray(std::shared_ptr<::arrow::Array> data, Writer& writer) {
5252
ArrowArray arr;
5353
ICEBERG_ARROW_RETURN_NOT_OK(::arrow::ExportArray(*data, &arr));
5454
ICEBERG_RETURN_UNEXPECTED(writer.Write(arr));
@@ -59,7 +59,7 @@ Status WriteArray(std::shared_ptr<::arrow::Array> data,
5959
const WriterOptions& writer_options) {
6060
ICEBERG_ASSIGN_OR_RAISE(
6161
auto writer, WriterFactoryRegistry::Open(FileFormatType::kParquet, writer_options));
62-
return WriteArrayInner(*writer, data);
62+
return WriteArray(data, *writer);
6363
}
6464

6565
Status ReadArray(std::shared_ptr<::arrow::Array>& out,
@@ -90,7 +90,7 @@ void DoRoundtrip(std::shared_ptr<::arrow::Array> data, std::shared_ptr<Schema> s
9090
ASSERT_THAT(writer_data, IsOk())
9191
<< "Failed to create writer: " << writer_data.error().message;
9292
auto writer = std::move(writer_data.value());
93-
ASSERT_THAT(WriteArrayInner(*writer, data), IsOk());
93+
ASSERT_THAT(WriteArray(data, *writer), IsOk());
9494

9595
ASSERT_THAT(ReadArray(out, {.path = basePath,
9696
.length = writer->length(),

0 commit comments

Comments
 (0)