[Fix](multi-catalog) Fix core in orc and parquet reader sometimes after low mem exception. (#36575)

## Proposed changes

Backport #36574.
This commit is contained in:
Qi Chen
2024-06-22 11:28:21 +08:00
committed by GitHub
parent 90a4dd09f3
commit 17cf34b244
2 changed files with 0 additions and 3 deletions

View File

@ -1594,7 +1594,6 @@ Status OrcReader::get_next_block_impl(Block* block, size_t* read_rows, bool* eof
} catch (std::exception& e) {
std::string _err_msg = e.what();
if (_io_ctx && _io_ctx->should_stop && _err_msg == "stop") {
block->clear_column_data();
*eof = true;
*read_rows = 0;
return Status::OK();
@ -1664,7 +1663,6 @@ Status OrcReader::get_next_block_impl(Block* block, size_t* read_rows, bool* eof
} catch (std::exception& e) {
std::string _err_msg = e.what();
if (_io_ctx && _io_ctx->should_stop && _err_msg == "stop") {
block->clear_column_data();
*eof = true;
*read_rows = 0;
return Status::OK();

View File

@ -525,7 +525,6 @@ Status ParquetReader::get_next_block(Block* block, size_t* read_rows, bool* eof)
Status batch_st =
_current_group_reader->next_batch(block, _batch_size, read_rows, &_row_group_eof);
if (batch_st.is<ErrorCode::END_OF_FILE>()) {
block->clear_column_data();
_current_group_reader.reset(nullptr);
*read_rows = 0;
*eof = true;