feature/qnode

This commit is contained in:
dapan1121 2022-02-23 10:52:53 +08:00
parent 1e194d2249
commit 1ce00b1b87
3 changed files with 9 additions and 1126 deletions

View File

@ -339,12 +339,16 @@ int32_t sclExecLogic(SLogicConditionNode *node, SScalarCtx *ctx, SScalarParam *o
SCL_ERR_RET(sclInitParamList(&params, node->pParameterList, ctx, &rowNum));
output->type = node->node.resType.type;
output->bytes = sizeof(bool);
output->num = rowNum;
output->data = calloc(rowNum, sizeof(bool));
if (NULL == output->data) {
sclError("calloc %d failed", (int32_t)(rowNum * sizeof(bool)));
SCL_ERR_JRET(TSDB_CODE_QRY_OUT_OF_MEMORY);
}
void *data = output->data;
bool value = false;
for (int32_t i = 0; i < rowNum; ++i) {
@ -366,6 +370,8 @@ int32_t sclExecLogic(SLogicConditionNode *node, SScalarCtx *ctx, SScalarParam *o
sclParamMoveNext(params, node->pParameterList->length);
}
output->data = data;
return TSDB_CODE_SUCCESS;
_return:

View File

@ -1,18 +1,4 @@
enable_testing()
MESSAGE(STATUS "build scalar unit test")
# GoogleTest requires at least C++11
SET(CMAKE_CXX_STANDARD 11)
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCE_LIST)
ADD_EXECUTABLE(scalarTest ${SOURCE_LIST})
TARGET_LINK_LIBRARIES(
scalarTest
PUBLIC os util common gtest qcom function nodes scalar
)
TARGET_INCLUDE_DIRECTORIES(
scalarTest
PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/scalar/"
PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/scalar/inc"
)
add_subdirectory(filter)
add_subdirectory(scalar)

File diff suppressed because it is too large Load Diff