feature/qnode
This commit is contained in:
parent
1e194d2249
commit
1ce00b1b87
|
@ -339,12 +339,16 @@ int32_t sclExecLogic(SLogicConditionNode *node, SScalarCtx *ctx, SScalarParam *o
|
||||||
SCL_ERR_RET(sclInitParamList(¶ms, node->pParameterList, ctx, &rowNum));
|
SCL_ERR_RET(sclInitParamList(¶ms, node->pParameterList, ctx, &rowNum));
|
||||||
|
|
||||||
output->type = node->node.resType.type;
|
output->type = node->node.resType.type;
|
||||||
|
output->bytes = sizeof(bool);
|
||||||
|
output->num = rowNum;
|
||||||
output->data = calloc(rowNum, sizeof(bool));
|
output->data = calloc(rowNum, sizeof(bool));
|
||||||
if (NULL == output->data) {
|
if (NULL == output->data) {
|
||||||
sclError("calloc %d failed", (int32_t)(rowNum * sizeof(bool)));
|
sclError("calloc %d failed", (int32_t)(rowNum * sizeof(bool)));
|
||||||
SCL_ERR_JRET(TSDB_CODE_QRY_OUT_OF_MEMORY);
|
SCL_ERR_JRET(TSDB_CODE_QRY_OUT_OF_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *data = output->data;
|
||||||
|
|
||||||
bool value = false;
|
bool value = false;
|
||||||
|
|
||||||
for (int32_t i = 0; i < rowNum; ++i) {
|
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);
|
sclParamMoveNext(params, node->pParameterList->length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output->data = data;
|
||||||
|
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
|
|
||||||
_return:
|
_return:
|
||||||
|
|
|
@ -1,18 +1,4 @@
|
||||||
|
enable_testing()
|
||||||
|
|
||||||
MESSAGE(STATUS "build scalar unit test")
|
add_subdirectory(filter)
|
||||||
|
add_subdirectory(scalar)
|
||||||
# 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"
|
|
||||||
)
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue