fix(query): handle the calculation of logic expression with different result rows, when constant expression exists.

This commit is contained in:
Haojun Liao 2024-03-13 23:13:24 +08:00
parent 8791a163f8
commit 3a0df8be8d
1 changed files with 5 additions and 1 deletions

View File

@ -808,7 +808,11 @@ int32_t sclExecLogic(SLogicConditionNode *node, SScalarCtx *ctx, SScalarParam *o
complete = false;
continue;
}
char *p = colDataGetData(params[m].columnData, i);
// 1=1 and tag_column = 1
int32_t ind = (i >= params[m].numOfRows)? (params[m].numOfRows - 1):i;
char* p = colDataGetData(params[m].columnData, ind);
GET_TYPED_DATA(value, bool, params[m].columnData->info.type, p);
if (LOGIC_COND_TYPE_AND == node->condType && (false == value)) {