提交 b421a5ec 编写于 作者: X Xiaoyu Wang

TD-13852 create stable and create subtable

......@@ -416,7 +416,11 @@ typedef struct {
* But for data in vnode side, we need all the following information.
*/
typedef struct {
union {
int16_t colId;
int16_t slotId;
};
int16_t type;
int16_t bytes;
SColumnFilterList flist;
......
......@@ -315,8 +315,6 @@ SSDataBlock* createOutputBuf(SExprInfo* pExpr, int32_t numOfOutput, int32_t numO
}
SSDataBlock* createOutputBuf_rv(SArray* pExprInfo, int32_t numOfRows) {
const static int32_t minSize = 8;
size_t numOfOutput = taosArrayGetSize(pExprInfo);
SSDataBlock *res = calloc(1, sizeof(SSDataBlock));
......@@ -330,15 +328,28 @@ SSDataBlock* createOutputBuf_rv(SArray* pExprInfo, int32_t numOfRows) {
idata.info.type = pExpr->base.resSchema.type;
idata.info.bytes = pExpr->base.resSchema.bytes;
idata.info.colId = pExpr->base.resSchema.colId;
int32_t size = TMAX(idata.info.bytes * numOfRows, minSize);
idata.pData = calloc(1, size); // at least to hold a pointer on x64 platform
taosArrayPush(res->pDataBlock, &idata);
}
blockDataEnsureCapacity(res, numOfRows);
return res;
}
SSDataBlock* createOutputBuf_rv1(SDataBlockDescNode* pNode) {
int32_t numOfCols = LIST_LENGTH(pNode->pSlots);
SSDataBlock* pBlock = calloc(1, sizeof(SSDataBlock));
pBlock->info.numOfCols = numOfCols;
pBlock->pDataBlock = taosArrayInit(numOfCols, sizeof(SColumnInfoData));
for(int32_t i = 0; i < numOfCols; ++i) {
SColumnInfoData idata = {{0}};
SSlotDescNode* pDescNode = nodesListGetNode(pNode->pSlots, i);
idata.info.type = pDescNode->dataType.type;
idata.info.bytes = pDescNode->dataType.bytes;
idata.info.slotId = pDescNode->slotId;
}
}
static bool isSelectivityWithTagsQuery(SqlFunctionCtx *pCtx, int32_t numOfOutput) {
return true;
// bool hasTags = false;
......@@ -8041,6 +8052,10 @@ static tsdbReaderT doCreateDataReader(STableScanPhysiNode* pTableScanNode, SRead
static int32_t doCreateTableGroup(void* metaHandle, int32_t tableType, uint64_t tableUid, STableGroupInfo* pGroupInfo, uint64_t queryId, uint64_t taskId);
SOperatorInfo* doCreateOperatorTreeNode(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo, SReadHandle* pHandle, uint64_t queryId, uint64_t taskId, STableGroupInfo* pTableGroupInfo) {
if (nodeType(pPhyNode) == QUERY_NODE_PHYSICAL_PLAN_PROJECT) { // ignore the project node
pPhyNode = nodesListGetNode(pPhyNode->pChildren, 0);
}
if (pPhyNode->pChildren == NULL || LIST_LENGTH(pPhyNode->pChildren) == 0) {
if (QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN == nodeType(pPhyNode)) {
SScanPhysiNode* pScanPhyNode = (SScanPhysiNode*)pPhyNode;
......@@ -8119,15 +8134,15 @@ static tsdbReaderT createDataReaderImpl(STableScanPhysiNode* pTableScanNode, STa
cond.twindow = pTableScanNode->scanRange;
cond.type = BLOCK_LOAD_OFFSET_SEQ_ORDER;
// cond.type = pTableScanNode->scanFlag;
for (int32_t i = 0; i < cond.numOfCols; ++i) {
// SExprInfo* pExprInfo = taosArrayGetP(pTableScanNode->scan.node.pTargets, i);
// assert(pExprInfo->pExpr->nodeType == TEXPR_COL_NODE);
STargetNode* pNode = (STargetNode*)nodesListGetNode(pTableScanNode->scan.pScanCols, i);
// SSchema* pSchema = pExprInfo->pExpr->pSchema;
// cond.colList[i].type = pSchema->type;
// cond.colList[i].bytes = pSchema->bytes;
// cond.colList[i].colId = pSchema->colId;
SColumnNode* pColNode = (SColumnNode*)pNode->pExpr;
cond.colList[i].type = pColNode->colType;
cond.colList[i].bytes = pColNode->node.resType.type;
cond.colList[i].colId = pColNode->colId;
}
return tsdbQueryTables(readHandle, &cond, pGroupInfo, queryId, taskId);
......
......@@ -224,17 +224,40 @@ int main(int argc, char** argv) {
TEST(testCase, build_executor_tree_Test) {
const char* msg = "{\n"
" \"Type\": \"33\",\n"
" \"NodeType\": \"48\",\n"
" \"Name\": \"PhysiSubplan\",\n"
" \"PhysiSubplan\": {\n"
" \"Id\": {\n"
" \"QueryId\": \"0\",\n"
" \"TemplateId\": \"0\",\n"
" \"SubplanId\": \"0\"\n"
" },\n"
" \"SubplanType\": \"0\",\n"
" \"MsgType\": \"515\",\n"
" \"Level\": \"0\",\n"
" \"NodeAddr\": {\n"
" \"Id\": \"1\",\n"
" \"InUse\": \"0\",\n"
" \"NumOfEps\": \"1\",\n"
" \"Eps\": [\n"
" {\n"
" \"Fqdn\": \"node1\",\n"
" \"Port\": \"6030\"\n"
" }\n"
" ]\n"
" },\n"
" \"RootNode\": {\n"
" \"NodeType\": \"41\",\n"
" \"Name\": \"PhysiProject\",\n"
" \"PhysiProject\": {\n"
" \"OutputDataBlockDesc\": {\n"
" \"Type\": \"19\",\n"
" \"NodeType\": \"19\",\n"
" \"Name\": \"TupleDesc\",\n"
" \"TupleDesc\": {\n"
" \"DataBlockId\": \"1\",\n"
" \"Slots\": [\n"
" {\n"
" \"Type\": \"20\",\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"0\",\n"
......@@ -249,7 +272,7 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"20\",\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"1\",\n"
......@@ -264,7 +287,7 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"20\",\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"2\",\n"
......@@ -279,7 +302,7 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"20\",\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"3\",\n"
......@@ -294,7 +317,7 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"20\",\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"4\",\n"
......@@ -309,7 +332,7 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"20\",\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"5\",\n"
......@@ -328,17 +351,17 @@ TEST(testCase, build_executor_tree_Test) {
" },\n"
" \"Children\": [\n"
" {\n"
" \"Type\": \"30\",\n"
" \"NodeType\": \"38\",\n"
" \"Name\": \"PhysiTableScan\",\n"
" \"PhysiTableScan\": {\n"
" \"OutputDataBlockDesc\": {\n"
" \"Type\": \"19\",\n"
" \"NodeType\": \"19\",\n"
" \"Name\": \"TupleDesc\",\n"
" \"TupleDesc\": {\n"
" \"DataBlockId\": \"0\",\n"
" \"Slots\": [\n"
" {\n"
" \"Type\": \"20\",\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"0\",\n"
......@@ -353,7 +376,7 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"20\",\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"1\",\n"
......@@ -368,7 +391,7 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"20\",\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"2\",\n"
......@@ -383,7 +406,7 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"20\",\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"3\",\n"
......@@ -398,7 +421,7 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"20\",\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"4\",\n"
......@@ -413,7 +436,7 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"20\",\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"5\",\n"
......@@ -432,13 +455,13 @@ TEST(testCase, build_executor_tree_Test) {
" },\n"
" \"ScanCols\": [\n"
" {\n"
" \"Type\": \"18\",\n"
" \"NodeType\": \"18\",\n"
" \"Name\": \"Target\",\n"
" \"Target\": {\n"
" \"DataBlockId\": \"0\",\n"
" \"SlotId\": \"0\",\n"
" \"Expr\": {\n"
" \"Type\": \"1\",\n"
" \"NodeType\": \"1\",\n"
" \"Name\": \"Column\",\n"
" \"Column\": {\n"
" \"DataType\": {\n"
......@@ -462,13 +485,13 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"18\",\n"
" \"NodeType\": \"18\",\n"
" \"Name\": \"Target\",\n"
" \"Target\": {\n"
" \"DataBlockId\": \"0\",\n"
" \"SlotId\": \"1\",\n"
" \"Expr\": {\n"
" \"Type\": \"1\",\n"
" \"NodeType\": \"1\",\n"
" \"Name\": \"Column\",\n"
" \"Column\": {\n"
" \"DataType\": {\n"
......@@ -492,13 +515,13 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"18\",\n"
" \"NodeType\": \"18\",\n"
" \"Name\": \"Target\",\n"
" \"Target\": {\n"
" \"DataBlockId\": \"0\",\n"
" \"SlotId\": \"2\",\n"
" \"Expr\": {\n"
" \"Type\": \"1\",\n"
" \"NodeType\": \"1\",\n"
" \"Name\": \"Column\",\n"
" \"Column\": {\n"
" \"DataType\": {\n"
......@@ -522,13 +545,13 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"18\",\n"
" \"NodeType\": \"18\",\n"
" \"Name\": \"Target\",\n"
" \"Target\": {\n"
" \"DataBlockId\": \"0\",\n"
" \"SlotId\": \"3\",\n"
" \"Expr\": {\n"
" \"Type\": \"1\",\n"
" \"NodeType\": \"1\",\n"
" \"Name\": \"Column\",\n"
" \"Column\": {\n"
" \"DataType\": {\n"
......@@ -552,13 +575,13 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"18\",\n"
" \"NodeType\": \"18\",\n"
" \"Name\": \"Target\",\n"
" \"Target\": {\n"
" \"DataBlockId\": \"0\",\n"
" \"SlotId\": \"4\",\n"
" \"Expr\": {\n"
" \"Type\": \"1\",\n"
" \"NodeType\": \"1\",\n"
" \"Name\": \"Column\",\n"
" \"Column\": {\n"
" \"DataType\": {\n"
......@@ -582,13 +605,13 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"18\",\n"
" \"NodeType\": \"18\",\n"
" \"Name\": \"Target\",\n"
" \"Target\": {\n"
" \"DataBlockId\": \"0\",\n"
" \"SlotId\": \"5\",\n"
" \"Expr\": {\n"
" \"Type\": \"1\",\n"
" \"NodeType\": \"1\",\n"
" \"Name\": \"Column\",\n"
" \"Column\": {\n"
" \"DataType\": {\n"
......@@ -625,13 +648,13 @@ TEST(testCase, build_executor_tree_Test) {
" ],\n"
" \"Projections\": [\n"
" {\n"
" \"Type\": \"18\",\n"
" \"NodeType\": \"18\",\n"
" \"Name\": \"Target\",\n"
" \"Target\": {\n"
" \"DataBlockId\": \"1\",\n"
" \"SlotId\": \"0\",\n"
" \"Expr\": {\n"
" \"Type\": \"1\",\n"
" \"NodeType\": \"1\",\n"
" \"Name\": \"Column\",\n"
" \"Column\": {\n"
" \"DataType\": {\n"
......@@ -655,13 +678,13 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"18\",\n"
" \"NodeType\": \"18\",\n"
" \"Name\": \"Target\",\n"
" \"Target\": {\n"
" \"DataBlockId\": \"1\",\n"
" \"SlotId\": \"1\",\n"
" \"Expr\": {\n"
" \"Type\": \"1\",\n"
" \"NodeType\": \"1\",\n"
" \"Name\": \"Column\",\n"
" \"Column\": {\n"
" \"DataType\": {\n"
......@@ -685,13 +708,13 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"18\",\n"
" \"NodeType\": \"18\",\n"
" \"Name\": \"Target\",\n"
" \"Target\": {\n"
" \"DataBlockId\": \"1\",\n"
" \"SlotId\": \"2\",\n"
" \"Expr\": {\n"
" \"Type\": \"1\",\n"
" \"NodeType\": \"1\",\n"
" \"Name\": \"Column\",\n"
" \"Column\": {\n"
" \"DataType\": {\n"
......@@ -715,13 +738,13 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"18\",\n"
" \"NodeType\": \"18\",\n"
" \"Name\": \"Target\",\n"
" \"Target\": {\n"
" \"DataBlockId\": \"1\",\n"
" \"SlotId\": \"3\",\n"
" \"Expr\": {\n"
" \"Type\": \"1\",\n"
" \"NodeType\": \"1\",\n"
" \"Name\": \"Column\",\n"
" \"Column\": {\n"
" \"DataType\": {\n"
......@@ -745,13 +768,13 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"18\",\n"
" \"NodeType\": \"18\",\n"
" \"Name\": \"Target\",\n"
" \"Target\": {\n"
" \"DataBlockId\": \"1\",\n"
" \"SlotId\": \"4\",\n"
" \"Expr\": {\n"
" \"Type\": \"1\",\n"
" \"NodeType\": \"1\",\n"
" \"Name\": \"Column\",\n"
" \"Column\": {\n"
" \"DataType\": {\n"
......@@ -775,13 +798,13 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" },\n"
" {\n"
" \"Type\": \"18\",\n"
" \"NodeType\": \"18\",\n"
" \"Name\": \"Target\",\n"
" \"Target\": {\n"
" \"DataBlockId\": \"1\",\n"
" \"SlotId\": \"5\",\n"
" \"Expr\": {\n"
" \"Type\": \"1\",\n"
" \"NodeType\": \"1\",\n"
" \"Name\": \"Column\",\n"
" \"Column\": {\n"
" \"DataType\": {\n"
......@@ -806,6 +829,113 @@ TEST(testCase, build_executor_tree_Test) {
" }\n"
" ]\n"
" }\n"
" },\n"
" \"DataSink\": {\n"
" \"NodeType\": \"46\",\n"
" \"Name\": \"PhysiDispatch\",\n"
" \"PhysiDispatch\": {\n"
" \"InputDataBlockDesc\": {\n"
" \"NodeType\": \"19\",\n"
" \"Name\": \"TupleDesc\",\n"
" \"TupleDesc\": {\n"
" \"DataBlockId\": \"1\",\n"
" \"Slots\": [\n"
" {\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"0\",\n"
" \"DataType\": {\n"
" \"Type\": \"9\",\n"
" \"Precision\": \"0\",\n"
" \"Scale\": \"0\",\n"
" \"Bytes\": \"8\"\n"
" },\n"
" \"Reserve\": false,\n"
" \"Output\": false\n"
" }\n"
" },\n"
" {\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"1\",\n"
" \"DataType\": {\n"
" \"Type\": \"4\",\n"
" \"Precision\": \"0\",\n"
" \"Scale\": \"0\",\n"
" \"Bytes\": \"4\"\n"
" },\n"
" \"Reserve\": false,\n"
" \"Output\": false\n"
" }\n"
" },\n"
" {\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"2\",\n"
" \"DataType\": {\n"
" \"Type\": \"8\",\n"
" \"Precision\": \"0\",\n"
" \"Scale\": \"0\",\n"
" \"Bytes\": \"20\"\n"
" },\n"
" \"Reserve\": false,\n"
" \"Output\": false\n"
" }\n"
" },\n"
" {\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"3\",\n"
" \"DataType\": {\n"
" \"Type\": \"5\",\n"
" \"Precision\": \"0\",\n"
" \"Scale\": \"0\",\n"
" \"Bytes\": \"8\"\n"
" },\n"
" \"Reserve\": false,\n"
" \"Output\": false\n"
" }\n"
" },\n"
" {\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"4\",\n"
" \"DataType\": {\n"
" \"Type\": \"7\",\n"
" \"Precision\": \"0\",\n"
" \"Scale\": \"0\",\n"
" \"Bytes\": \"8\"\n"
" },\n"
" \"Reserve\": false,\n"
" \"Output\": false\n"
" }\n"
" },\n"
" {\n"
" \"NodeType\": \"20\",\n"
" \"Name\": \"SlotDesc\",\n"
" \"SlotDesc\": {\n"
" \"SlotId\": \"5\",\n"
" \"DataType\": {\n"
" \"Type\": \"7\",\n"
" \"Precision\": \"0\",\n"
" \"Scale\": \"0\",\n"
" \"Bytes\": \"8\"\n"
" },\n"
" \"Reserve\": false,\n"
" \"Output\": false\n"
" }\n"
" }\n"
" ]\n"
" }\n"
" }\n"
" }\n"
" }\n"
" }\n"
"}";
SExecTaskInfo* pTaskInfo = nullptr;
......
......@@ -58,9 +58,8 @@ int32_t __catalogGetTableHashVgroup(struct SCatalog* pCatalog, void *pRpc, const
return mockCatalogService->catalogGetTableHashVgroup(pTableName, vgInfo);
}
int32_t __catalogGetTableDistVgInfo(SCatalog* pCatalog, void *pTransporter, const SEpSet* pMgmtEps, const SName* pTableName, SArray** pVgroupList) {
// return mockCatalogService->catalogGetTableDistVgInfo(pTableName, pVgroupList);
return 0;
int32_t __catalogGetTableDistVgInfo(SCatalog* pCtg, void *pRpc, const SEpSet* pMgmtEps, const SName* pTableName, SArray** pVgList) {
return mockCatalogService->catalogGetTableDistVgInfo(pTableName, pVgList);
}
void initMetaDataEnv() {
......
......@@ -126,6 +126,19 @@ public:
return 0;
}
int32_t catalogGetTableDistVgInfo(const SName* pTableName, SArray** pVgList) const {
SVgroupInfo info = {0};
info.vgId = 1;
addEpIntoEpSet(&info.epset, "node1", 6030);
info.hashBegin = 0;
info.hashEnd = 1;
*pVgList = taosArrayInit(4, sizeof(SVgroupInfo));
taosArrayPush(*pVgList, &info);
return 0;
}
TableBuilder& createTableBuilder(const std::string& db, const std::string& tbname, int8_t tableType, int32_t numOfColumns, int32_t numOfTags) {
builder_ = TableBuilder::createTableBuilder(tableType, numOfColumns, numOfTags);
meta_[db][tbname] = builder_->table();
......@@ -314,3 +327,7 @@ int32_t MockCatalogService::catalogGetTableMeta(const SName* pTableName, STableM
int32_t MockCatalogService::catalogGetTableHashVgroup(const SName* pTableName, SVgroupInfo* vgInfo) const {
return impl_->catalogGetTableHashVgroup(pTableName, vgInfo);
}
int32_t MockCatalogService::catalogGetTableDistVgInfo(const SName* pTableName, SArray** pVgList) const {
return impl_->catalogGetTableDistVgInfo(pTableName, pVgList);
}
\ No newline at end of file
......@@ -59,6 +59,7 @@ public:
int32_t catalogGetTableMeta(const SName* pTableName, STableMeta** pTableMeta) const;
int32_t catalogGetTableHashVgroup(const SName* pTableName, SVgroupInfo* vgInfo) const;
int32_t catalogGetTableDistVgInfo(const SName* pTableName, SArray** pVgList) const;
private:
std::unique_ptr<MockCatalogServiceImpl> impl_;
......
......@@ -41,6 +41,14 @@
namespace {
SColumnInfo createColumnInfo(int32_t colId, int32_t type, int32_t bytes) {
SColumnInfo info = {0};
info.colId = colId;
info.type = type;
info.bytes = bytes;
return info;
}
int64_t scltLeftV = 21, scltRightV = 10;
double scltLeftVd = 21.0, scltRightVd = 10.0;
......@@ -914,7 +922,7 @@ TEST(columnTest, smallint_value_add_int_column) {
SArray *blockList = taosArrayInit(2, POINTER_BYTES);
taosArrayPush(blockList, &src);
SColumnInfo colInfo = {.colId = 1, .type = TSDB_DATA_TYPE_DOUBLE, .bytes = sizeof(double)};
SColumnInfo colInfo = createColumnInfo(1, TSDB_DATA_TYPE_DOUBLE, sizeof(double));
int16_t dataBlockId = 0, slotId = 0;
scltAppendReservedSlot(blockList, &dataBlockId, &slotId, true, rowNum, &colInfo);
scltMakeTargetNode(&opNode, dataBlockId, slotId, opNode);
......@@ -954,7 +962,7 @@ TEST(columnTest, bigint_column_multi_binary_column) {
SArray *blockList = taosArrayInit(1, POINTER_BYTES);
taosArrayPush(blockList, &src);
SColumnInfo colInfo = {.colId = 1, .type = TSDB_DATA_TYPE_DOUBLE, .bytes = sizeof(double)};
SColumnInfo colInfo = createColumnInfo(1, TSDB_DATA_TYPE_DOUBLE, sizeof(double));
int16_t dataBlockId = 0, slotId = 0;
scltAppendReservedSlot(blockList, &dataBlockId, &slotId, false, rowNum, &colInfo);
scltMakeTargetNode(&opNode, dataBlockId, slotId, opNode);
......@@ -992,7 +1000,7 @@ TEST(columnTest, smallint_column_and_binary_column) {
SArray *blockList = taosArrayInit(1, POINTER_BYTES);
taosArrayPush(blockList, &src);
SColumnInfo colInfo = {.colId = 1, .type = TSDB_DATA_TYPE_BIGINT, .bytes = sizeof(int64_t)};
SColumnInfo colInfo = createColumnInfo(1, TSDB_DATA_TYPE_BIGINT, sizeof(int64_t));
int16_t dataBlockId = 0, slotId = 0;
scltAppendReservedSlot(blockList, &dataBlockId, &slotId, false, rowNum, &colInfo);
scltMakeTargetNode(&opNode, dataBlockId, slotId, opNode);
......@@ -1025,7 +1033,7 @@ TEST(columnTest, smallint_column_or_float_column) {
SArray *blockList = taosArrayInit(1, POINTER_BYTES);
taosArrayPush(blockList, &src);
SColumnInfo colInfo = {.colId = 1, .type = TSDB_DATA_TYPE_BIGINT, .bytes = sizeof(int64_t)};
SColumnInfo colInfo = createColumnInfo(1, TSDB_DATA_TYPE_BIGINT, sizeof(int64_t));
int16_t dataBlockId = 0, slotId = 0;
scltAppendReservedSlot(blockList, &dataBlockId, &slotId, true, rowNum, &colInfo);
scltMakeTargetNode(&opNode, dataBlockId, slotId, opNode);
......@@ -1058,7 +1066,7 @@ TEST(columnTest, smallint_column_or_double_value) {
SArray *blockList = taosArrayInit(1, POINTER_BYTES);
taosArrayPush(blockList, &src);
SColumnInfo colInfo = {.colId = 1, .type = TSDB_DATA_TYPE_BIGINT, .bytes = sizeof(int64_t)};
SColumnInfo colInfo = createColumnInfo(1, TSDB_DATA_TYPE_BIGINT, sizeof(int64_t));
int16_t dataBlockId = 0, slotId = 0;
scltAppendReservedSlot(blockList, &dataBlockId, &slotId, true, rowNum, &colInfo);
scltMakeTargetNode(&opNode, dataBlockId, slotId, opNode);
......@@ -1091,7 +1099,7 @@ TEST(columnTest, smallint_column_greater_double_value) {
SArray *blockList = taosArrayInit(1, POINTER_BYTES);
taosArrayPush(blockList, &src);
SColumnInfo colInfo = {.colId = 1, .type = TSDB_DATA_TYPE_BOOL, .bytes = sizeof(bool)};
SColumnInfo colInfo = createColumnInfo(1, TSDB_DATA_TYPE_BOOL, sizeof(bool));
int16_t dataBlockId = 0, slotId = 0;
scltAppendReservedSlot(blockList, &dataBlockId, &slotId, true, rowNum, &colInfo);
scltMakeTargetNode(&opNode, dataBlockId, slotId, opNode);
......@@ -1131,7 +1139,7 @@ TEST(columnTest, int_column_in_double_list) {
SArray *blockList = taosArrayInit(1, POINTER_BYTES);
taosArrayPush(blockList, &src);
SColumnInfo colInfo = {.colId = 1, .type = TSDB_DATA_TYPE_BOOL, .bytes = sizeof(bool)};
SColumnInfo colInfo = createColumnInfo(1, TSDB_DATA_TYPE_BOOL, sizeof(bool));
int16_t dataBlockId = 0, slotId = 0;
scltAppendReservedSlot(blockList, &dataBlockId, &slotId, true, rowNum, &colInfo);
scltMakeTargetNode(&opNode, dataBlockId, slotId, opNode);
......@@ -1190,7 +1198,7 @@ TEST(columnTest, binary_column_in_binary_list) {
SArray *blockList = taosArrayInit(1, POINTER_BYTES);
taosArrayPush(blockList, &src);
SColumnInfo colInfo = {.colId = 1, .type = TSDB_DATA_TYPE_BOOL, .bytes = sizeof(bool)};
SColumnInfo colInfo = createColumnInfo(1, TSDB_DATA_TYPE_BOOL, sizeof(bool));
int16_t dataBlockId = 0, slotId = 0;
scltAppendReservedSlot(blockList, &dataBlockId, &slotId, false, rowNum, &colInfo);
scltMakeTargetNode(&opNode, dataBlockId, slotId, opNode);
......@@ -1234,7 +1242,7 @@ TEST(columnTest, binary_column_like_binary) {
SArray *blockList = taosArrayInit(1, POINTER_BYTES);
taosArrayPush(blockList, &src);
SColumnInfo colInfo = {.colId = 1, .type = TSDB_DATA_TYPE_BOOL, .bytes = sizeof(bool)};
SColumnInfo colInfo = createColumnInfo(1, TSDB_DATA_TYPE_BOOL, sizeof(bool));
int16_t dataBlockId = 0, slotId = 0;
scltAppendReservedSlot(blockList, &dataBlockId, &slotId, false, rowNum, &colInfo);
scltMakeTargetNode(&opNode, dataBlockId, slotId, opNode);
......@@ -1276,7 +1284,7 @@ TEST(columnTest, binary_column_is_true) {
SArray *blockList = taosArrayInit(1, POINTER_BYTES);
taosArrayPush(blockList, &src);
SColumnInfo colInfo = {.colId = 1, .type = TSDB_DATA_TYPE_BOOL, .bytes = sizeof(bool)};
SColumnInfo colInfo = createColumnInfo(1, TSDB_DATA_TYPE_BOOL, sizeof(bool));
int16_t dataBlockId = 0, slotId = 0;
scltAppendReservedSlot(blockList, &dataBlockId, &slotId, false, rowNum, &colInfo);
scltMakeTargetNode(&opNode, dataBlockId, slotId, opNode);
......@@ -1320,7 +1328,7 @@ TEST(columnTest, binary_column_is_null) {
SArray *blockList = taosArrayInit(1, POINTER_BYTES);
taosArrayPush(blockList, &src);
SColumnInfo colInfo = {.colId = 1, .type = TSDB_DATA_TYPE_BOOL, .bytes = sizeof(bool)};
SColumnInfo colInfo = createColumnInfo(1, TSDB_DATA_TYPE_BOOL, sizeof(bool));
int16_t dataBlockId = 0, slotId = 0;
scltAppendReservedSlot(blockList, &dataBlockId, &slotId, false, rowNum, &colInfo);
scltMakeTargetNode(&opNode, dataBlockId, slotId, opNode);
......@@ -1363,7 +1371,7 @@ TEST(columnTest, binary_column_is_not_null) {
SArray *blockList = taosArrayInit(1, POINTER_BYTES);
taosArrayPush(blockList, &src);
SColumnInfo colInfo = {.colId = 1, .type = TSDB_DATA_TYPE_BOOL, .bytes = sizeof(bool)};
SColumnInfo colInfo = createColumnInfo(1, TSDB_DATA_TYPE_BOOL, sizeof(bool));
int16_t dataBlockId = 0, slotId = 0;
scltAppendReservedSlot(blockList, &dataBlockId, &slotId, false, rowNum, &colInfo);
scltMakeTargetNode(&opNode, dataBlockId, slotId, opNode);
......@@ -1405,7 +1413,7 @@ TEST(columnTest, greater_and_lower) {
SArray *blockList = taosArrayInit(1, POINTER_BYTES);
taosArrayPush(blockList, &src);
SColumnInfo colInfo = {.colId = 1, .type = TSDB_DATA_TYPE_BOOL, .bytes = sizeof(bool)};
SColumnInfo colInfo = createColumnInfo(1, TSDB_DATA_TYPE_BOOL, sizeof(bool));
int16_t dataBlockId = 0, slotId = 0;
scltAppendReservedSlot(blockList, &dataBlockId, &slotId, false, rowNum, &colInfo);
scltMakeTargetNode(&logicNode, dataBlockId, slotId, logicNode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册