HuaHuaY commented on code in PR #55856:
URL: https://github.com/apache/arrow/pull/55856#discussion_r4738685306


##########
cpp/src/parquet/column_writer.cc:
##########
@@ -1093,17 +1094,15 @@ void ColumnWriterImpl::BuildDataPageV2(int64_t 
definition_levels_rle_size,
   // here for safety check.
   DCHECK(!page_stats.has_null_count || page_stats.null_count == null_count);
 
-  // Write the page to OutputStream eagerly if there is no dictionary or
-  // if dictionary encoding has fallen back to PLAIN
-  if (has_dictionary_ && !fallback_) {  // Save pages until end of dictionary 
encoding
+  if (buffer_page) {
     std::unique_ptr<DataPage> page_ptr = std::make_unique<DataPageV2>(
-        combined, num_values, null_count, num_rows, encoding_, 
def_levels_byte_length,
+        page_buffer, num_values, null_count, num_rows, encoding_, 
def_levels_byte_length,
         rep_levels_byte_length, uncompressed_size, page_is_compressed,
         std::move(page_stats), first_row_index, std::move(page_size_stats));
     total_compressed_bytes_ += page_ptr->size() + sizeof(format::PageHeader);
     data_pages_.push_back(std::move(page_ptr));
   } else {
-    DataPageV2 page(combined, num_values, null_count, num_rows, encoding_,
+    DataPageV2 page(page_buffer, num_values, null_count, num_rows, encoding_,
                     def_levels_byte_length, rep_levels_byte_length, 
uncompressed_size,
                     page_is_compressed, std::move(page_stats), first_row_index,
                     std::move(page_size_stats));

Review Comment:
   This comment was addressed earlier.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to