Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cpp/src/parquet/file_serialize_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class TestSerialize : public PrimitiveTypedTest<TestType> {
for (int rg = 0; rg < num_rowgroups_ / 2; ++rg) {
RowGroupWriter* row_group_writer;
row_group_writer = file_writer->AppendRowGroup();
EXPECT_EQ(rows_per_rowgroup_ * rg, file_writer->num_rows());
for (int col = 0; col < num_columns_; ++col) {
auto column_writer =
static_cast<TypedColumnWriter<TestType>*>(row_group_writer->NextColumn());
Expand All @@ -97,6 +98,7 @@ class TestSerialize : public PrimitiveTypedTest<TestType> {
for (int rg = 0; rg < num_rowgroups_ / 2; ++rg) {
RowGroupWriter* row_group_writer;
row_group_writer = file_writer->AppendBufferedRowGroup();
EXPECT_EQ(rows_per_rowgroup_ * (rg + num_rowgroups_ / 2), file_writer->num_rows());
for (int batch = 0; batch < (rows_per_rowgroup_ / rows_per_batch_); ++batch) {
for (int col = 0; col < num_columns_; ++col) {
auto column_writer =
Expand Down
1 change: 1 addition & 0 deletions cpp/src/parquet/file_writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ class FileSerializer : public ParquetFileWriter::Contents {

RowGroupWriter* AppendRowGroup(bool buffered_row_group) {
if (row_group_writer_) {
num_rows_ += row_group_writer_->num_rows();
row_group_writer_->Close();
}
int16_t row_group_ordinal = -1; // row group ordinal not set
Expand Down
Loading