kangkaisen commented on a change in pull request #3869:
URL: https://github.com/apache/incubator-doris/pull/3869#discussion_r442710682



##########
File path: be/src/olap/aggregate_func.h
##########
@@ -449,15 +449,22 @@ struct 
AggregateFuncTraits<OLAP_FIELD_AGGREGATION_REPLACE_IF_NOT_NULL, OLAP_FIEL
 template <>
 struct AggregateFuncTraits<OLAP_FIELD_AGGREGATION_HLL_UNION, 
OLAP_FIELD_TYPE_HLL> {
     static void init(RowCursorCell* dst, const char* src, bool src_null, 
MemPool* mem_pool, ObjectPool* agg_pool) {
-        DCHECK_EQ(src_null, false);
         dst->set_not_null();
 
         auto* src_slice = reinterpret_cast<const Slice*>(src);
         auto* dst_slice = reinterpret_cast<Slice*>(dst->mutable_cell_ptr());
 
+        // Because of history bug, we ingest some NULL HLL data in storage,
+        // which slice data is nullptr or invalid address,
+        // we must handle this case to avoid process crash.
+        HyperLogLog* hll = nullptr;

Review comment:
       If the data has dirty, I think we should repair it. 
   You could reload the table data or develop a tool to repair dirty data. 
   I think we shouldn't make code to be compatible with dirty data. which means 
we forever couldn't remove the compatible code.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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

Reply via email to