From ed1e130ef60fa579d2edfa47e1ef42155faacfae Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 23 Jun 2022 09:10:30 +0800 Subject: [PATCH] [BUGFIX] fix wrong children quantity in debug string (#10348) --- be/src/vec/exprs/vcompound_pred.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/be/src/vec/exprs/vcompound_pred.h b/be/src/vec/exprs/vcompound_pred.h index 94b7a7292b..5d3e6be25c 100644 --- a/be/src/vec/exprs/vcompound_pred.h +++ b/be/src/vec/exprs/vcompound_pred.h @@ -39,11 +39,14 @@ public: } } - virtual std::string debug_string() const override { + std::string debug_string() const override { std::stringstream out; - out << "CompoundPredicate {("; - out << _children[0]->debug_string() << ") " << _fn.name.function_name << " ("; - out << _children[1]->debug_string() << ")}"; + out << "CompoundPredicate {" << _fn.name.function_name; + out << " (" << _children[0]->debug_string(); + if (children().size() > 1) { + out << ", " << _children[1]->debug_string(); + } + out << ")}"; return out.str(); } };