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

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


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

commit 282d31a044661cdcdcde4238654cf4e184f6fe3b
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Nov 10 01:04:24 2024 +0800

    branch-3.0: [Optimize](Expr) Opt getting value of VLitreal (#43248)
    
    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 d4e8c883106..bb95788bb33 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 {


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

Reply via email to