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 011baeb2d2d [bugfix](allocatebytes) ignore null ptr column in Block 
(#41093) (#41099)
011baeb2d2d is described below

commit 011baeb2d2dcbd58ccc81d81607b691806d2a824
Author: yiguolei <[email protected]>
AuthorDate: Mon Sep 23 12:18:22 2024 +0800

    [bugfix](allocatebytes) ignore null ptr column in Block (#41093) (#41099)
    
    ## Proposed changes
    Sometimes if expr failed, then there will be a nullptr column left in
    the block.
    We should ignore the nullptr column, or exception will be thrown and
    some profile will not computed correctly.
    
    ## Proposed changes
    
    Issue Number: close #xxx
    
    <!--Describe your changes.-->
    
    Co-authored-by: yiguolei <[email protected]>
---
 be/src/vec/core/block.cpp | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/be/src/vec/core/block.cpp b/be/src/vec/core/block.cpp
index 29c6d21bb78..8d73cd12144 100644
--- a/be/src/vec/core/block.cpp
+++ b/be/src/vec/core/block.cpp
@@ -440,13 +440,9 @@ size_t Block::allocated_bytes() const {
     size_t res = 0;
     for (const auto& elem : data) {
         if (!elem.column) {
-            std::stringstream ss;
-            for (const auto& e : data) {
-                ss << e.name + " ";
-            }
-            throw Exception(ErrorCode::INTERNAL_ERROR,
-                            "Column {} in block is nullptr, in method bytes. 
All Columns are {}",
-                            elem.name, ss.str());
+            // Sometimes if expr failed, then there will be a nullptr
+            // column left in the block.
+            continue;
         }
         res += elem.column->allocated_bytes();
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to