You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ya...@apache.org on 2021/01/05 01:48:53 UTC

[incubator-doris] branch master updated: [Bug] Fix bug that the min/max function has an error in handling string null values. (#5189)

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

yangzhg 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 03e3605  [Bug] Fix bug that the min/max function has an error in handling string null values. (#5189)
03e3605 is described below

commit 03e36056eba1cbcccc87b28e28b91792dae5a417
Author: Mingyu Chen <mo...@gmail.com>
AuthorDate: Tue Jan 5 09:48:38 2021 +0800

    [Bug] Fix bug that the min/max function has an error in handling string null values. (#5189)
    
    null should be ignored in min/max function.
    And if there is no data, null should be return.
    
    Co-authored-by: morningman <ch...@baidu.com>
---
 be/src/olap/aggregate_func.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/be/src/olap/aggregate_func.h b/be/src/olap/aggregate_func.h
index 1c902af..c3ddf3a 100644
--- a/be/src/olap/aggregate_func.h
+++ b/be/src/olap/aggregate_func.h
@@ -300,6 +300,7 @@ struct AggregateFuncTraits<OLAP_FIELD_AGGREGATION_MAX, OLAP_FIELD_TYPE_VARCHAR>
                 memory_copy(dst_slice->data, src_slice->data, src_slice->size);
                 dst_slice->size = src_slice->size;
             }
+            dst->set_is_null(false);
         }
     }
 };


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