This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 625a1ea6ad0 branch-2.1: [Optimize](Expr) Opt getting value of VLitreal 
(#43249)
625a1ea6ad0 is described below

commit 625a1ea6ad08ba02dc812fcb0b38ebafac0121af
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Nov 10 01:03:56 2024 +0800

    branch-2.1: [Optimize](Expr) Opt getting value of VLitreal (#43249)
    
    Cherry-picked from #43204
    
    Co-authored-by: zclllhhjj <zhaochan...@selectdb.com>
---
 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 1d02a63321b..8dcc5e3cb5a 100644
--- a/be/src/vec/exprs/vliteral.cpp
+++ b/be/src/vec/exprs/vliteral.cpp
@@ -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 {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to