Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Optimize](Expr) Opt getting value of VLitreal #43204

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions be/src/vec/exprs/vliteral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading