Skip to content

Commit

Permalink
branch-2.1: [Optimize](Expr) Opt getting value of VLitreal (#43249)
Browse files Browse the repository at this point in the history
Cherry-picked from #43204

Co-authored-by: zclllhhjj <zhaochangle@selectdb.com>
  • Loading branch information
github-actions[bot] and zclllyybb authored Nov 9, 2024
1 parent fba06b3 commit 625a1ea
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions be/src/vec/exprs/vliteral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,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 {
Expand Down

0 comments on commit 625a1ea

Please sign in to comment.