diff --git a/velox/dwio/dwrf/test/WriterFlushTest.cpp b/velox/dwio/dwrf/test/WriterFlushTest.cpp index 6304d991c9e5..d6ea640f47a2 100644 --- a/velox/dwio/dwrf/test/WriterFlushTest.cpp +++ b/velox/dwio/dwrf/test/WriterFlushTest.cpp @@ -140,7 +140,7 @@ class MockMemoryPool : public velox::memory::MemoryPool { /*unused*/) override { VELOX_UNSUPPORTED("freeContiguous unsupported"); } - + bool highUsage() override { VELOX_NYI("{} unsupported", __FUNCTION__); } diff --git a/velox/dwio/parquet/writer/Writer.cpp b/velox/dwio/parquet/writer/Writer.cpp index c30c2e3f986b..86c18f6a4887 100644 --- a/velox/dwio/parquet/writer/Writer.cpp +++ b/velox/dwio/parquet/writer/Writer.cpp @@ -28,7 +28,8 @@ void Writer::flush() { finalSink_.get(), pool_, queryCtx_->queryConfig().dataBufferGrowRatio()); - auto arrowProperties = ::parquet::ArrowWriterProperties::Builder().build(); + auto arrowProperties = + ::parquet::ArrowWriterProperties::Builder().build(); PARQUET_ASSIGN_OR_THROW( arrowWriter_, ::parquet::arrow::FileWriter::Open( @@ -43,7 +44,9 @@ void Writer::flush() { std::vector> chunks; for (int colIdx = 0; colIdx < fields.size(); colIdx++) { auto dataType = fields.at(colIdx)->type(); - auto chunk = arrow::ChunkedArray::Make(std::move(stagingChunks_.at(colIdx)), dataType).ValueOrDie(); + auto chunk = arrow::ChunkedArray::Make( + std::move(stagingChunks_.at(colIdx)), dataType) + .ValueOrDie(); chunks.push_back(chunk); } auto table = arrow::Table::Make(schema_, std::move(chunks), stagingRows_); @@ -60,8 +63,8 @@ void Writer::flush() { } /** - * This method would cache input `ColumnarBatch` to make the size of row group big. - * It would flush when: + * This method would cache input `ColumnarBatch` to make the size of row group + * big. It would flush when: * - the cached numRows bigger than `maxRowGroupRows_` * - the cached bytes bigger than `maxRowGroupBytes_` * @@ -83,7 +86,8 @@ void Writer::write(const RowVectorPtr& data) { auto bytes = data->estimateFlatSize(); auto numRows = data->size(); - if (stagingBytes_ + bytes > maxRowGroupBytes_ || stagingRows_ + numRows > maxRowGroupRows_) { + if (stagingBytes_ + bytes > maxRowGroupBytes_ || + stagingRows_ + numRows > maxRowGroupRows_) { flush(); }