[Log](expr) add DCHECK info for expr close DCHECK (#19683)
This commit is contained in:
@ -50,7 +50,12 @@ public:
|
||||
|
||||
void clear() {
|
||||
std::lock_guard<SpinLock> l(_lock);
|
||||
for (Element& elem : _objects) elem.delete_fn(elem.obj);
|
||||
// reverse delete object to make sure the obj can
|
||||
// safe access the member object construt early by
|
||||
// object pool
|
||||
for (auto obj = _objects.rbegin(); obj != _objects.rend(); obj++) {
|
||||
obj->delete_fn(obj->obj);
|
||||
}
|
||||
_objects.clear();
|
||||
}
|
||||
|
||||
|
||||
@ -345,8 +345,6 @@ std::string VExpr::debug_string() const {
|
||||
// TODO: implement partial debug string for member vars
|
||||
std::stringstream out;
|
||||
out << " type=" << _type.debug_string();
|
||||
out << " codegen="
|
||||
<< "false";
|
||||
|
||||
if (!_children.empty()) {
|
||||
out << " children=" << debug_string(_children);
|
||||
|
||||
@ -49,7 +49,8 @@ VExprContext::VExprContext(VExpr* expr)
|
||||
VExprContext::~VExprContext() {
|
||||
// Do not delete this code, this code here is used to check if forget to close the opened context
|
||||
// Or there will be memory leak
|
||||
DCHECK(!_prepared || _closed) << get_stack_trace();
|
||||
DCHECK(!_prepared || _closed) << get_stack_trace() << " prepare:" << _prepared
|
||||
<< " closed:" << _closed << " expr:" << _root->debug_string();
|
||||
}
|
||||
|
||||
doris::Status VExprContext::execute(doris::vectorized::Block* block, int* result_column_id) {
|
||||
|
||||
Reference in New Issue
Block a user