@@ -2451,14 +2451,6 @@ Status OrcReader::_get_next_block_impl(Block* block, size_t* read_rows, bool* eo
24512451 return Status::OK ();
24522452 }
24532453
2454- // Limit memory per batch for load paths: pre-shrink _batch_size using the bytes-per-row
2455- // estimate from the previous batch so the current batch stays within load_reader_max_block_bytes
2456- // (effective from call 2 onward; first batch is capped on the next call).
2457- const int64_t max_block_bytes =
2458- (_state != nullptr && _state->query_type () == TQueryType::LOAD &&
2459- config::load_reader_max_block_bytes > 0 )
2460- ? config::load_reader_max_block_bytes
2461- : 0 ;
24622454 if (_push_down_agg_type == TPushAggOp::type::COUNT) {
24632455 auto rows = std::min (get_remaining_rows (), (int64_t )_batch_size);
24642456
@@ -2475,15 +2467,6 @@ Status OrcReader::_get_next_block_impl(Block* block, size_t* read_rows, bool* eo
24752467 return Status::OK ();
24762468 }
24772469
2478- if (max_block_bytes > 0 && _load_bytes_per_row > 0 && _row_reader) {
2479- size_t new_batch_size = std::max (
2480- (size_t )1 , (size_t )((int64_t )max_block_bytes / (int64_t )_load_bytes_per_row));
2481- if (new_batch_size != _batch_size) {
2482- _batch_size = new_batch_size;
2483- _batch = _row_reader->createRowBatch (_batch_size);
2484- }
2485- }
2486-
24872470 if (!_seek_to_read_one_line ()) {
24882471 *eof = true ;
24892472 return Status::OK ();
@@ -2826,9 +2809,6 @@ Status OrcReader::_get_next_block_impl(Block* block, size_t* read_rows, bool* eo
28262809 *read_rows = block->rows ();
28272810 }
28282811
2829- if (max_block_bytes > 0 && *read_rows > 0 ) {
2830- _load_bytes_per_row = block->bytes () / *read_rows;
2831- }
28322812 return Status::OK ();
28332813}
28342814
0 commit comments