This is an automated email from the ASF dual-hosted git repository.
panxiaolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new f7c724f8a3 [Bug](excution) avoid core dump on filter_block_internal
and add debug information (#21433)
f7c724f8a3 is described below
commit f7c724f8a306e91d629f0ebbb05915bd2db5419f
Author: Pxl <[email protected]>
AuthorDate: Mon Jul 3 18:10:30 2023 +0800
[Bug](excution) avoid core dump on filter_block_internal and add debug
information (#21433)
avoid core dump on filter_block_internal and add debug information
---
be/src/vec/core/block.cpp | 6 ++++++
be/src/vec/exprs/vexpr_context.cpp | 17 +++++++++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/be/src/vec/core/block.cpp b/be/src/vec/core/block.cpp
index b59e9fa6c2..8dbcf22486 100644
--- a/be/src/vec/core/block.cpp
+++ b/be/src/vec/core/block.cpp
@@ -701,6 +701,12 @@ void Block::filter_block_internal(Block* block, const
std::vector<uint32_t>& col
if (column->size() != count) {
if (column->is_exclusive()) {
const auto result_size =
column->assume_mutable()->filter(filter);
+ if (result_size != count) {
+ throw Exception(ErrorCode::INTERNAL_ERROR,
+ "result_size not euqal with
filter_size, result_size={}, "
+ "filter_size={}",
+ result_size, count);
+ }
CHECK_EQ(result_size, count);
} else {
column = column->filter(filter, count);
diff --git a/be/src/vec/exprs/vexpr_context.cpp
b/be/src/vec/exprs/vexpr_context.cpp
index 236dfc4045..70ae91b060 100644
--- a/be/src/vec/exprs/vexpr_context.cpp
+++ b/be/src/vec/exprs/vexpr_context.cpp
@@ -245,8 +245,21 @@ Status VExprContext::execute_conjuncts_and_filter_block(
std::move(*block->get_by_position(col).column).assume_mutable()->clear();
}
} else {
- RETURN_IF_CATCH_EXCEPTION(
- Block::filter_block_internal(block, columns_to_filter,
result_filter));
+ try {
+ Block::filter_block_internal(block, columns_to_filter,
result_filter);
+ } catch (const Exception& e) {
+ std::string str;
+ for (auto ctx : ctxs) {
+ if (str.length()) {
+ str += ",";
+ }
+ str += ctx->root()->debug_string();
+ }
+
+ return Status::InternalError(
+ "filter_block_internal meet exception, exprs=[{}],
exception={}", str,
+ e.what());
+ }
}
Block::erase_useless_column(block, column_to_keep);
return Status::OK();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]