You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2020/12/18 13:40:05 UTC

[incubator-doris] branch master updated: [Bug] Fix bug when delete condition is null but zonemap is not null (#5109)

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

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 9848079  [Bug] Fix bug when delete condition is null but zonemap is not null (#5109)
9848079 is described below

commit 984807910f07025bb8de0f4aa7c07938c5fd777b
Author: Mingyu Chen <mo...@gmail.com>
AuthorDate: Fri Dec 18 21:39:52 2020 +0800

    [Bug] Fix bug when delete condition is null but zonemap is not null (#5109)
    
    If a column does not have any null value, and execute a delete operation
    with "where k1 is null" on it, BE may crash.
    
    This bug is introducaed from #5030
---
 be/src/olap/olap_cond.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/be/src/olap/olap_cond.cpp b/be/src/olap/olap_cond.cpp
index d3ae847..4508e2e 100644
--- a/be/src/olap/olap_cond.cpp
+++ b/be/src/olap/olap_cond.cpp
@@ -387,18 +387,20 @@ int Cond::del_eval(const std::pair<WrapperField*, WrapperField*>& stat) const {
                 ret = DEL_SATISFIED;
             } else if (stat.first->is_null() && !stat.second->is_null()) {
                 ret = DEL_PARTIAL_SATISFIED;
+            } else if (!stat.first->is_null() && !stat.second->is_null()){
+                ret = DEL_NOT_SATISFIED;
             } else {
                 CHECK(false) << "It will not happen when the stat's min is not null and max is null";
-                ret = DEL_SATISFIED;
             }
         } else {
             if (stat.first->is_null() && stat.second->is_null()) {
                 ret = DEL_NOT_SATISFIED;
             } else if (stat.first->is_null() && !stat.second->is_null()) {
                 ret = DEL_PARTIAL_SATISFIED;
+            } else if (!stat.first->is_null() && !stat.second->is_null()){
+                ret = DEL_SATISFIED;
             } else {
                 CHECK(false) << "It will not happen when the stat's min is not null and max is null";
-                ret = DEL_SATISFIED;
             }
         }
         return ret;


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