From 57a2ad3a08b292045937fcf7eac2248e1bfedf62 Mon Sep 17 00:00:00 2001 From: zhaochangle Date: Mon, 4 Nov 2024 16:03:17 +0800 Subject: [PATCH] 1 --- be/src/vec/exprs/vliteral.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/be/src/vec/exprs/vliteral.cpp b/be/src/vec/exprs/vliteral.cpp index d4e8c8831065a7..bb95788bb336a2 100644 --- a/be/src/vec/exprs/vliteral.cpp +++ b/be/src/vec/exprs/vliteral.cpp @@ -70,15 +70,8 @@ Status VLiteral::execute(VExprContext* context, vectorized::Block* block, int* r } std::string VLiteral::value() const { - //TODO: dcheck the equality of size with 1. then use string with size to replace the ss. - std::stringstream out; - for (size_t i = 0; i < _column_ptr->size(); i++) { - if (i != 0) { - out << ", "; - } - out << _data_type->to_string(*_column_ptr, i); - } - return out.str(); + DCHECK(_column_ptr->size() == 1); + return _data_type->to_string(*_column_ptr, 0); } std::string VLiteral::debug_string() const {