From cdc2002e700b931bd62761e49b74c713e5c9a04d Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 7 May 2022 18:15:17 +0800 Subject: [PATCH 1/2] refactor(query): do some internal refactor. --- source/libs/executor/inc/executorimpl.h | 1 - source/libs/executor/src/executorimpl.c | 1 - 2 files changed, 2 deletions(-) diff --git a/source/libs/executor/inc/executorimpl.h b/source/libs/executor/inc/executorimpl.h index 3ed65f4a05..9eed76a0fe 100644 --- a/source/libs/executor/inc/executorimpl.h +++ b/source/libs/executor/inc/executorimpl.h @@ -225,7 +225,6 @@ typedef struct SExecTaskInfo { char* sql; // query sql string jmp_buf env; // jump to this position when error happens. EOPTR_EXEC_MODEL execModel; // operator execution model [batch model|stream model] - struct SSubplan *plan; struct SOperatorInfo* pRoot; } SExecTaskInfo; diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index c0ea54ce4a..321b7b68a5 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -5209,7 +5209,6 @@ int32_t createExecTaskInfoImpl(SSubplan* pPlan, SExecTaskInfo** pTaskInfo, SRead goto _complete; } - (*pTaskInfo)->plan = pPlan; return code; _complete: From 9b3d7aa410ce1ae8db405466ab4bec9c16860877 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 7 May 2022 18:19:56 +0800 Subject: [PATCH 2/2] fix(query): remove a false assert. --- source/libs/function/src/builtinsimpl.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c index 0808ec58b0..896c1c9164 100644 --- a/source/libs/function/src/builtinsimpl.c +++ b/source/libs/function/src/builtinsimpl.c @@ -1446,11 +1446,6 @@ int32_t diffFunction(SqlFunctionCtx* pCtx) { // initial value is not set yet if (numOfElems <= 0) { - /* - * 1. current block and blocks before are full of null - * 2. current block may be null value - */ - assert(pCtx->hasNull); return 0; } else { return (isFirstBlock) ? numOfElems - 1 : numOfElems;