diff --git a/documentation20/cn/02.getting-started/02.taosdemo/docs.md b/documentation20/cn/02.getting-started/02.taosdemo/docs.md index 3f91dbb35130a2ff78e5ef23219b79433af33ce3..4e43eac069465a092ab3f48b4069d5630da5fba9 100644 --- a/documentation20/cn/02.getting-started/02.taosdemo/docs.md +++ b/documentation20/cn/02.getting-started/02.taosdemo/docs.md @@ -4,7 +4,7 @@ 自从 TDengine 2019年 7 月开源以来,凭借创新的数据建模设计、快捷的安装方式、易用的编程接口和强大的数据写入查询性能博得了大量时序数据开发者的青睐。其中写入和查询性能往往令刚接触 TDengine 的用户称叹不已。为了便于用户在最短时间内就可以体验到 TDengine 的高性能特点,我们专门开发了一个应用程序 taosdemo 用于对 TDengine 进行写入和查询的性能测试,用户可以通过 taosdemo 轻松模拟大量设备产生海量数据的场景,并且可以通过 taosdemo 参数灵活控制表的列数、数据类型、乱序比例以及并发线程数量。 -运行 taosdemo 很简单,通过下载 TDengine 安装包(https://www.taosdata.com/cn/all-downloads/)或者自行下载 TDengine 代码(https://github.com/taosdata/TDengine)编译都可以在安装目录或者编译结果目录中找到并运行。 +运行 taosdemo 很简单,通过下载 TDengine 安装包( https://www.taosdata.com/cn/all-downloads/ )或者自行下载 TDengine 代码( https://github.com/taosdata/TDengine )编译都可以在安装目录或者编译结果目录中找到并运行。 接下来本文为大家讲解 taosdemo 的使用介绍及注意事项。 diff --git a/documentation20/cn/02.getting-started/docs.md b/documentation20/cn/02.getting-started/docs.md index 64b05740863ddb24e1851dd230ef1093488c128b..5f887df914ef06d40f3b3b8bf6ef8dfe18fe6ecf 100644 --- a/documentation20/cn/02.getting-started/docs.md +++ b/documentation20/cn/02.getting-started/docs.md @@ -178,7 +178,7 @@ taos> select avg(current), max(voltage), min(phase) from test.d10 interval(10s); ## taosdemo 详细功能列表 taosdemo 命令本身带有很多选项,配置表的数目、记录条数等等,请执行 `taosdemo --help` 详细列出。您可以设置不同参数进行体验。 -taosdemo 详细使用方法请参照 [如何使用taosdemo对TDengine进行性能测试?](https://www.taosdata.com/cn/documentation/getting-started/taosdemo )。 +taosdemo 详细使用方法请参照 [如何使用taosdemo对TDengine进行性能测试](https://www.taosdata.com/cn/documentation/getting-started/taosdemo )。 ## 客户端和报警模块 diff --git a/src/client/src/tscGlobalmerge.c b/src/client/src/tscGlobalmerge.c index 22e09d5d8c92bdac330f0406908c1aa367f4c64d..68677423d429d494de6595e47e05c396560c2e54 100644 --- a/src/client/src/tscGlobalmerge.c +++ b/src/client/src/tscGlobalmerge.c @@ -233,7 +233,7 @@ static int32_t tscFlushTmpBufferImpl(tExtMemBuffer *pMemoryBuf, tOrderDescriptor // sort before flush to disk, the data must be consecutively put on tFilePage. if (pDesc->orderInfo.numOfCols > 0) { - tColDataQSort(pDesc, (int32_t)pPage->num, 0, (int32_t)pPage->num - 1, pPage->data, orderType); + tColDataMergeSort(pDesc, (int32_t)pPage->num, 0, (int32_t)pPage->num - 1, pPage->data, orderType); } #ifdef _DEBUG_VIEW @@ -364,7 +364,7 @@ static int32_t createOrderDescriptor(tOrderDescriptor **pOrderDesc, SQueryInfo* SExprInfo* pExprInfo = tscExprGet(pQueryInfo, j); int32_t functionId = pExprInfo->base.functionId; - if (pColIndex->colId == pExprInfo->base.colInfo.colId && (functionId == TSDB_FUNC_PRJ || functionId == TSDB_FUNC_TAG)) { + if (pColIndex->colId == pExprInfo->base.colInfo.colId && (functionId == TSDB_FUNC_PRJ || functionId == TSDB_FUNC_TAG || functionId == TSDB_FUNC_TAGPRJ)) { orderColIndexList[i] = j; break; } diff --git a/src/client/src/tscLocal.c b/src/client/src/tscLocal.c index c3c65018a50aea8e7f36d89c15c6b7faa12f2047..0a7a1a67949a3f0cccf923e745859f7c0692dda3 100644 --- a/src/client/src/tscLocal.c +++ b/src/client/src/tscLocal.c @@ -440,7 +440,7 @@ static int32_t tscSCreateSetValueToResObj(SSqlObj *pSql, int32_t rowLen, const c SQueryInfo* pQueryInfo = tscGetQueryInfo(&pSql->cmd); int32_t numOfRows = 1; if (strlen(ddl) == 0) { - + } pSql->res.pMerger = tscInitResObjForLocalQuery(numOfRows, rowLen, pSql->self); tscInitResForMerge(&pSql->res); @@ -459,7 +459,7 @@ static int32_t tscSCreateBuildResult(SSqlObj *pSql, BuildType type, const char * int32_t rowLen = tscSCreateBuildResultFields(pSql, type, result); tscFieldInfoUpdateOffset(pQueryInfo); - return tscSCreateSetValueToResObj(pSql, rowLen, str, result); + return tscSCreateSetValueToResObj(pSql, rowLen, str, result); } int32_t tscRebuildCreateTableStatement(void *param,char *result) { SCreateBuilder *builder = (SCreateBuilder *)param; @@ -473,8 +473,8 @@ int32_t tscRebuildCreateTableStatement(void *param,char *result) { code = tscGetTableTagValue(builder, buf); if (code == TSDB_CODE_SUCCESS) { snprintf(result + strlen(result), TSDB_MAX_BINARY_LEN - strlen(result), "CREATE TABLE `%s` USING `%s` TAGS %s", builder->buf, builder->sTableName, buf); - code = tscSCreateBuildResult(builder->pParentSql, SCREATE_BUILD_TABLE, builder->buf, result); - } + code = tscSCreateBuildResult(builder->pParentSql, SCREATE_BUILD_TABLE, builder->buf, result); + } free(buf); return code; } @@ -490,27 +490,27 @@ static int32_t tscGetDBInfo(SCreateBuilder *builder, char *result) { TAOS_FIELD *fields = taos_fetch_fields(pSql); int num_fields = taos_num_fields(pSql); - char buf[TSDB_DB_NAME_LEN + 64] = {0}; + char buf[TSDB_DB_NAME_LEN + 64] = {0}; do { memset(buf, 0, sizeof(buf)); - int32_t* lengths = taos_fetch_lengths(pSql); + int32_t* lengths = taos_fetch_lengths(pSql); int32_t ret = tscGetNthFieldResult(row, fields, lengths, 0, buf); if (0 == ret && STR_NOCASE_EQUAL(buf, strlen(buf), builder->buf, strlen(builder->buf))) { - snprintf(result + strlen(result), TSDB_MAX_BINARY_LEN - strlen(result), "CREATE DATABASE %s", buf); + snprintf(result + strlen(result), TSDB_MAX_BINARY_LEN - strlen(result), "CREATE DATABASE %s", buf); for (int i = 1; i < num_fields; i++) { for (int j = 0; showColumns[j] != NULL; j++) { if (STR_NOCASE_EQUAL(fields[i].name, strlen(fields[i].name), showColumns[j], strlen(showColumns[j]))) { memset(buf, 0, sizeof(buf)); ret = tscGetNthFieldResult(row, fields, lengths, i, buf); if (ret == 0) { - snprintf(result + strlen(result), TSDB_MAX_BINARY_LEN - strlen(result), " %s %s", showColumns[j], buf); + snprintf(result + strlen(result), TSDB_MAX_BINARY_LEN - strlen(result), " %s %s", showColumns[j], buf); } } } } break; - } - + } + row = tscFetchRow(builder); } while (row != NULL); @@ -528,9 +528,9 @@ int32_t tscRebuildCreateDBStatement(void *param,char *result) { if (buf == NULL) { return TSDB_CODE_TSC_OUT_OF_MEMORY; } - code = tscGetDBInfo(param, buf); + code = tscGetDBInfo(param, buf); if (code == TSDB_CODE_SUCCESS) { - code = tscSCreateBuildResult(builder->pParentSql, SCREATE_BUILD_DB, builder->buf, buf); + code = tscSCreateBuildResult(builder->pParentSql, SCREATE_BUILD_DB, builder->buf, buf); } free(buf); return code; @@ -539,7 +539,7 @@ int32_t tscRebuildCreateDBStatement(void *param,char *result) { static int32_t tscGetTableTagColumnName(SSqlObj *pSql, char **result) { char *buf = (char *)malloc(TSDB_MAX_BINARY_LEN); if (buf == NULL) { - return TSDB_CODE_TSC_OUT_OF_MEMORY; + return TSDB_CODE_TSC_OUT_OF_MEMORY; } buf[0] = 0; @@ -548,33 +548,33 @@ static int32_t tscGetTableTagColumnName(SSqlObj *pSql, char **result) { pMeta->tableType == TSDB_STREAM_TABLE) { free(buf); return TSDB_CODE_TSC_INVALID_VALUE; - } + } - SSchema *pTagsSchema = tscGetTableTagSchema(pMeta); + SSchema *pTagsSchema = tscGetTableTagSchema(pMeta); int32_t numOfTags = tscGetNumOfTags(pMeta); for (int32_t i = 0; i < numOfTags; i++) { if (i != numOfTags - 1) { - snprintf(buf + strlen(buf), TSDB_MAX_BINARY_LEN - strlen(buf), "%s,", pTagsSchema[i].name); + snprintf(buf + strlen(buf), TSDB_MAX_BINARY_LEN - strlen(buf), "`%s`,", pTagsSchema[i].name); } else { - snprintf(buf + strlen(buf), TSDB_MAX_BINARY_LEN - strlen(buf), "%s", pTagsSchema[i].name); + snprintf(buf + strlen(buf), TSDB_MAX_BINARY_LEN - strlen(buf), "`%s`", pTagsSchema[i].name); } - } + } *result = buf; return TSDB_CODE_SUCCESS; -} +} static int32_t tscRebuildDDLForSubTable(SSqlObj *pSql, const char *tableName, char *ddl) { SQueryInfo* pQueryInfo = tscGetQueryInfo(&pSql->cmd); STableMetaInfo *pTableMetaInfo = tscGetMetaInfo(pQueryInfo, 0); STableMeta * pMeta = pTableMetaInfo->pTableMeta; - SSqlObj *pInterSql = (SSqlObj *)calloc(1, sizeof(SSqlObj)); + SSqlObj *pInterSql = (SSqlObj *)calloc(1, sizeof(SSqlObj)); if (pInterSql == NULL) { return TSDB_CODE_TSC_OUT_OF_MEMORY; - } + } - SCreateBuilder *param = (SCreateBuilder *)malloc(sizeof(SCreateBuilder)); + SCreateBuilder *param = (SCreateBuilder *)malloc(sizeof(SCreateBuilder)); if (param == NULL) { free(pInterSql); return TSDB_CODE_TSC_OUT_OF_MEMORY; diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index f772826c9420c758eb08e2588981abe0a2e36528..2c590ef74ef8946b37765d78ddb3731d0a8d4029 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -1841,7 +1841,7 @@ static int32_t parseSmlTimeStamp(TAOS_SML_KV **pTS, const char **index, SSmlLine const char *start, *cur; int32_t ret = TSDB_CODE_SUCCESS; int len = 0; - char key[] = "_ts"; + char key[] = "ts"; char *value = NULL; start = cur = *index; diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index c501456b705e2658b93b20f39d6745c3819f3d9f..82b32bf91cc0a90a09e544cf34cc7b242959e00d 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -437,7 +437,7 @@ int32_t readFromFile(char *name, uint32_t *len, void **buf) { int32_t handleUserDefinedFunc(SSqlObj* pSql, struct SSqlInfo* pInfo) { - const char *msg1 = "invalidate function name"; + const char *msg1 = "invalid function name or length"; const char *msg2 = "path is too long"; const char *msg3 = "invalid outputtype"; #ifdef LUA_EMBEDDED @@ -1489,7 +1489,7 @@ static bool validateTableColumnInfo(SArray* pFieldList, SSqlCmd* pCmd) { const char* msg3 = "duplicated column names"; const char* msg4 = "invalid data type"; const char* msg5 = "invalid binary/nchar column length"; - const char* msg6 = "invalid column name"; + const char* msg6 = "invalid column name or length"; const char* msg7 = "too many columns"; // number of fields no less than 2 @@ -1560,7 +1560,7 @@ static bool validateTagParams(SArray* pTagsList, SArray* pFieldList, SSqlCmd* pC const char* msg3 = "duplicated column names"; //const char* msg4 = "timestamp not allowed in tags"; const char* msg5 = "invalid data type in tags"; - const char* msg6 = "invalid tag name"; + const char* msg6 = "invalid tag name or length"; const char* msg7 = "invalid binary/nchar tag length"; // number of fields at least 1 @@ -1629,7 +1629,7 @@ static bool validateTagParams(SArray* pTagsList, SArray* pFieldList, SSqlCmd* pC */ int32_t validateOneTag(SSqlCmd* pCmd, TAOS_FIELD* pTagField) { const char* msg3 = "tag length too long"; - const char* msg4 = "invalid tag name"; + const char* msg4 = "invalid tag name or length"; const char* msg5 = "invalid binary/nchar tag length"; const char* msg6 = "invalid data type in tags"; const char* msg7 = "too many columns"; @@ -1702,7 +1702,7 @@ int32_t validateOneColumn(SSqlCmd* pCmd, TAOS_FIELD* pColField) { const char* msg1 = "too many columns"; const char* msg3 = "column length too long"; const char* msg4 = "invalid data type"; - const char* msg5 = "invalid column name"; + const char* msg5 = "invalid column name or length"; const char* msg6 = "invalid column length"; // assert(pCmd->numOfClause == 1); @@ -2107,7 +2107,7 @@ int32_t validateSelectNodeList(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SArray* pS const char* msg8 = "not support distinct in nest query"; const char* msg9 = "_block_dist not support subquery, only support stable/table"; const char* msg10 = "not support group by in block func"; - const char* msg11 = "invalid alias name"; + const char* msg11 = "invalid alias name or length"; // too many result columns not support order by in query if (taosArrayGetSize(pSelNodeList) > TSDB_MAX_COLUMNS) { @@ -6940,6 +6940,10 @@ int32_t validateLocalConfig(SMiscInfo* pOptions) { } int32_t validateColumnName(char* name) { + if (strlen(name) == 0) { + return TSDB_CODE_TSC_INVALID_OPERATION; + } + bool ret = taosIsKeyWordToken(name, (int32_t)strlen(name)); if (ret) { return TSDB_CODE_TSC_INVALID_OPERATION; diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 126aa3bc046b1e1d133a4d5f28a30a51fe537846..98693c94f1d68c194946fbf8b4c00e92c410c9ea 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -3086,12 +3086,16 @@ int tscRenewTableMeta(SSqlObj *pSql, int32_t tableIndex) { pSql->rootObj->retryReason = pSql->retryReason; + SSqlObj *tmpSql = pSql->rootObj; + tscFreeSubobj(pSql->rootObj); + tfree(tmpSql->pSubs); + SArray* pNameList = taosArrayInit(1, POINTER_BYTES); SArray* vgroupList = taosArrayInit(1, POINTER_BYTES); char* n = strdup(name); taosArrayPush(pNameList, &n); - code = getMultiTableMetaFromMnode(pSql, pNameList, vgroupList, NULL, tscTableMetaCallBack, true); + code = getMultiTableMetaFromMnode(tmpSql, pNameList, vgroupList, NULL, tscTableMetaCallBack, true); taosArrayDestroyEx(pNameList, freeElem); taosArrayDestroyEx(vgroupList, freeElem); diff --git a/src/client/src/tscSql.c b/src/client/src/tscSql.c index 89da3c5640c6523d4d2a816b8ae0293310c5830a..6abdab4880f837c505eeba10b0dd9af6c1b86974 100644 --- a/src/client/src/tscSql.c +++ b/src/client/src/tscSql.c @@ -29,6 +29,7 @@ #include "ttimer.h" #include "tscProfile.h" +static char clusterDefaultId[] = "clusterDefaultId"; static bool validImpl(const char* str, size_t maxsize) { if (str == NULL) { return false; @@ -193,7 +194,9 @@ TAOS *taos_connect_internal(const char *ip, const char *user, const char *pass, tscBuildAndSendRequest(pSql, NULL); tsem_wait(&pSql->rspSem); - + if (0 == strlen(pSql->pTscObj->clusterId)) { + memcpy(pSql->pTscObj->clusterId, clusterDefaultId, strlen(clusterDefaultId)); + } pSql->pTscObj->pClusterInfo = (SClusterInfo *)tscAcquireClusterInfo(pSql->pTscObj->clusterId); if (pSql->res.code != TSDB_CODE_SUCCESS) { terrno = pSql->res.code; diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index f6614fdb79f18b70cadc2351edc8e402e95bf41e..3b3770dae978f079576799190771b9c628cafb31 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -133,8 +133,8 @@ void tscClusterInfoDestroy(SClusterInfo *pObj) { void *tscAcquireClusterInfo(const char *clusterId) { pthread_mutex_lock(&clusterMutex); - size_t len = strlen(clusterId); + SClusterInfo *pObj = NULL; SClusterInfo **ppObj = taosHashGet(tscClusterMap, clusterId, len); if (ppObj == NULL || *ppObj == NULL) { diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 9d6d3ddbe9e3300cf1dda6f9d5232fcd26d5e3b3..fb2f3d5da5c507e4048b42c2d1de3d41eb9ab085 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -268,10 +268,6 @@ bool tscIsProjectionQueryOnSTable(SQueryInfo* pQueryInfo, int32_t tableIndex) { functionId != TSDB_FUNC_TS && functionId != TSDB_FUNC_SCALAR_EXPR && functionId != TSDB_FUNC_TS_COMP && - functionId != TSDB_FUNC_DIFF && - functionId != TSDB_FUNC_DERIVATIVE && - functionId != TSDB_FUNC_MAVG && - functionId != TSDB_FUNC_CSUM && functionId != TSDB_FUNC_TS_DUMMY && functionId != TSDB_FUNC_TID_TAG && !TSDB_FUNC_IS_SCALAR(functionId)) { @@ -3464,6 +3460,7 @@ int32_t tscQueryInfoCopy(SQueryInfo* pQueryInfo, const SQueryInfo* pSrc) { pQueryInfo->sessionWindow = pSrc->sessionWindow; pQueryInfo->pTableMetaInfo = NULL; pQueryInfo->multigroupResult = pSrc->multigroupResult; + pQueryInfo->stateWindow = pSrc->stateWindow; pQueryInfo->bufLen = pSrc->bufLen; pQueryInfo->orderProjectQuery = pSrc->orderProjectQuery; @@ -4868,7 +4865,7 @@ int32_t createProjectionExpr(SQueryInfo* pQueryInfo, STableMetaInfo* pTableMetaI } } - pse->colInfo.flag = TSDB_COL_NORMAL; + pse->colInfo.flag = pSource->base.colInfo.flag; //TSDB_COL_NORMAL; pse->resType = pSource->base.resType; pse->resBytes = pSource->base.resBytes; strncpy(pse->colInfo.name, pSource->base.aliasName, tListLen(pse->colInfo.name)); diff --git a/src/plugins/http/src/httpServer.c b/src/plugins/http/src/httpServer.c index 68d160c3cfd5fd06df36fce98badea036d77907e..7f350a6f1599ba857a4249f500ffcb59bd50985e 100644 --- a/src/plugins/http/src/httpServer.c +++ b/src/plugins/http/src/httpServer.c @@ -53,7 +53,7 @@ static void httpStopThread(HttpThread *pThread) { break; } } while (0); - if (r) { + if (r && taosCheckPthreadValid(pThread->thread)) { pthread_cancel(pThread->thread); } #else @@ -63,15 +63,21 @@ static void httpStopThread(HttpThread *pThread) { httpError("%s, failed to create eventfd, will call pthread_cancel instead, which may result in data corruption: %s", pThread->label, strerror(errno)); pThread->stop = true; - pthread_cancel(pThread->thread); + if (taosCheckPthreadValid(pThread->thread)) { + pthread_cancel(pThread->thread); + } } else if (epoll_ctl(pThread->pollFd, EPOLL_CTL_ADD, fd, &event) < 0) { httpError("%s, failed to call epoll_ctl, will call pthread_cancel instead, which may result in data corruption: %s", pThread->label, strerror(errno)); - pthread_cancel(pThread->thread); + if (taosCheckPthreadValid(pThread->thread)) { + pthread_cancel(pThread->thread); + } } #endif // __APPLE__ - pthread_join(pThread->thread, NULL); + if (taosCheckPthreadValid(pThread->thread)) { + pthread_join(pThread->thread, NULL); + } #ifdef __APPLE__ if (sv[0] != -1) { @@ -398,9 +404,12 @@ static bool httpReadData(HttpContext *pContext) { return true; } } else if (nread < 0) { - if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) { + if (errno == EINTR) { + httpDebug("context:%p, fd:%d, read from socket error:%d, continue", pContext, pContext->fd, errno); + continue; + } else if (errno == EAGAIN || errno == EWOULDBLOCK) { httpDebug("context:%p, fd:%d, read from socket error:%d, wait another event", pContext, pContext->fd, errno); - continue; // later again + return false; } else { httpError("context:%p, fd:%d, read from socket error:%d, close connect", pContext, pContext->fd, errno); taosCloseSocket(pContext->fd); diff --git a/src/query/inc/qExtbuffer.h b/src/query/inc/qExtbuffer.h index 6728809c4f685a9afd0306abef88e9cbe2f63256..ccdfd5c05994b71bd911c3a66d02dc1ffa58a474 100644 --- a/src/query/inc/qExtbuffer.h +++ b/src/query/inc/qExtbuffer.h @@ -236,6 +236,9 @@ typedef int (*__col_compar_fn_t)(tOrderDescriptor *, int32_t numOfRows, int32_t void tColDataQSort(tOrderDescriptor *, int32_t numOfRows, int32_t start, int32_t end, char *data, int32_t orderType); +void tColDataMergeSort(tOrderDescriptor *, int32_t numOfRows, int32_t start, int32_t end, char *data, int32_t orderType); + + void taoscQSort(void** pCols, SSchema* pSchema, int32_t numOfCols, int32_t numOfRows, int32_t index, __compar_fn_t compareFn); int32_t compare_sa(tOrderDescriptor *, int32_t numOfRows, int32_t idx1, int32_t idx2, char *data); diff --git a/src/query/src/qAggMain.c b/src/query/src/qAggMain.c index 8de4072a243b3dd537ecba99b5e09c52d64bebc1..a8ce33c0cee75bc59bc094b9fa768ed688b818f8 100644 --- a/src/query/src/qAggMain.c +++ b/src/query/src/qAggMain.c @@ -196,6 +196,14 @@ typedef struct { char *taglists; } SSampleFuncInfo; +typedef struct { + bool valueAssigned; + union { + int64_t i64Prev; + double d64Prev; + }; +} SDiffFuncInfo; + int32_t getResultDataInfo(int32_t dataType, int32_t dataBytes, int32_t functionId, int32_t param, int16_t *type, int32_t *bytes, int32_t *interBytes, int16_t extLength, bool isSuperTable, SUdfInfo* pUdfInfo) { if (!isValidDataType(dataType)) { @@ -214,10 +222,13 @@ int32_t getResultDataInfo(int32_t dataType, int32_t dataBytes, int32_t functionI if (functionId == TSDB_FUNC_INTERP) { *interBytes = sizeof(SInterpInfoDetail); + } else if (functionId == TSDB_FUNC_DIFF) { + *interBytes = sizeof(SDiffFuncInfo); } else { *interBytes = 0; } + return TSDB_CODE_SUCCESS; } @@ -2995,18 +3006,16 @@ static void full_copy_function(SQLFunctionCtx *pCtx) { } } -enum { - INITIAL_VALUE_NOT_ASSIGNED = 0, -}; static bool diff_function_setup(SQLFunctionCtx *pCtx, SResultRowCellInfo* pResInfo) { if (!function_setup(pCtx, pResInfo)) { return false; } - // diff function require the value is set to -1 - pCtx->param[1].nType = INITIAL_VALUE_NOT_ASSIGNED; - return false; + SDiffFuncInfo* pDiffInfo = GET_ROWCELL_INTERBUF(pResInfo); + pDiffInfo->valueAssigned = false; + pDiffInfo->i64Prev = 0; + return true; } static bool deriv_function_setup(SQLFunctionCtx *pCtx, SResultRowCellInfo* pResultInfo) { @@ -3212,22 +3221,14 @@ static void deriv_function(SQLFunctionCtx *pCtx) { GET_RES_INFO(pCtx)->numOfRes += notNullElems; } -#define DIFF_IMPL(ctx, d, type) \ - do { \ - if ((ctx)->param[1].nType == INITIAL_VALUE_NOT_ASSIGNED) { \ - (ctx)->param[1].nType = (ctx)->inputType; \ - *(type *)&(ctx)->param[1].i64 = *(type *)(d); \ - } else { \ - *(type *)(ctx)->pOutput = *(type *)(d) - (*(type *)(&(ctx)->param[1].i64)); \ - *(type *)(&(ctx)->param[1].i64) = *(type *)(d); \ - *(int64_t *)(ctx)->ptsOutputBuf = GET_TS_DATA(ctx, index); \ - } \ - } while (0); // TODO difference in date column static void diff_function(SQLFunctionCtx *pCtx) { + SResultRowCellInfo *pResInfo = GET_RES_INFO(pCtx); + SDiffFuncInfo *pDiffInfo = GET_ROWCELL_INTERBUF(pResInfo); + void *data = GET_INPUT_DATA_LIST(pCtx); - bool isFirstBlock = (pCtx->param[1].nType == INITIAL_VALUE_NOT_ASSIGNED); + bool isFirstBlock = (pDiffInfo->valueAssigned == false); int32_t notNullElems = 0; @@ -3247,15 +3248,15 @@ static void diff_function(SQLFunctionCtx *pCtx) { continue; } - if (pCtx->param[1].nType != INITIAL_VALUE_NOT_ASSIGNED) { // initial value is not set yet - *pOutput = (int32_t)(pData[i] - pCtx->param[1].i64); // direct previous may be null + if (pDiffInfo->valueAssigned) { + *pOutput = (int32_t)(pData[i] - pDiffInfo->i64Prev); // direct previous may be null *pTimestamp = (tsList != NULL)? tsList[i]:0; pOutput += 1; pTimestamp += 1; } - pCtx->param[1].i64 = pData[i]; - pCtx->param[1].nType = pCtx->inputType; + pDiffInfo->i64Prev = pData[i]; + pDiffInfo->valueAssigned = true; notNullElems++; } break; @@ -3269,15 +3270,15 @@ static void diff_function(SQLFunctionCtx *pCtx) { continue; } - if (pCtx->param[1].nType != INITIAL_VALUE_NOT_ASSIGNED) { // initial value is not set yet - *pOutput = pData[i] - pCtx->param[1].i64; // direct previous may be null + if (pDiffInfo->valueAssigned) { + *pOutput = pData[i] - pDiffInfo->i64Prev; // direct previous may be null *pTimestamp = (tsList != NULL)? tsList[i]:0; pOutput += 1; pTimestamp += 1; } - pCtx->param[1].i64 = pData[i]; - pCtx->param[1].nType = pCtx->inputType; + pDiffInfo->i64Prev = pData[i]; + pDiffInfo->valueAssigned = true; notNullElems++; } break; @@ -3291,15 +3292,15 @@ static void diff_function(SQLFunctionCtx *pCtx) { continue; } - if (pCtx->param[1].nType != INITIAL_VALUE_NOT_ASSIGNED) { // initial value is not set yet - SET_DOUBLE_VAL(pOutput, pData[i] - pCtx->param[1].dKey); // direct previous may be null + if (pDiffInfo->valueAssigned) { // initial value is not set yet + SET_DOUBLE_VAL(pOutput, pData[i] - pDiffInfo->d64Prev); // direct previous may be null *pTimestamp = (tsList != NULL)? tsList[i]:0; pOutput += 1; pTimestamp += 1; } - pCtx->param[1].dKey = pData[i]; - pCtx->param[1].nType = pCtx->inputType; + pDiffInfo->d64Prev = pData[i]; + pDiffInfo->valueAssigned = true; notNullElems++; } break; @@ -3313,15 +3314,15 @@ static void diff_function(SQLFunctionCtx *pCtx) { continue; } - if (pCtx->param[1].nType != INITIAL_VALUE_NOT_ASSIGNED) { // initial value is not set yet - *pOutput = (float)(pData[i] - pCtx->param[1].dKey); // direct previous may be null + if (pDiffInfo->valueAssigned) { // initial value is not set yet + *pOutput = (float)(pData[i] - pDiffInfo->d64Prev); // direct previous may be null *pTimestamp = (tsList != NULL)? tsList[i]:0; pOutput += 1; pTimestamp += 1; } - pCtx->param[1].dKey = pData[i]; - pCtx->param[1].nType = pCtx->inputType; + pDiffInfo->d64Prev = pData[i]; + pDiffInfo->valueAssigned = true; notNullElems++; } break; @@ -3335,15 +3336,15 @@ static void diff_function(SQLFunctionCtx *pCtx) { continue; } - if (pCtx->param[1].nType != INITIAL_VALUE_NOT_ASSIGNED) { // initial value is not set yet - *pOutput = (int16_t)(pData[i] - pCtx->param[1].i64); // direct previous may be null + if (pDiffInfo->valueAssigned) { // initial value is not set yet + *pOutput = (int16_t)(pData[i] - pDiffInfo->i64Prev); // direct previous may be null *pTimestamp = (tsList != NULL)? tsList[i]:0; pOutput += 1; pTimestamp += 1; } - pCtx->param[1].i64 = pData[i]; - pCtx->param[1].nType = pCtx->inputType; + pDiffInfo->i64Prev = pData[i]; + pDiffInfo->valueAssigned = true; notNullElems++; } break; @@ -3358,15 +3359,15 @@ static void diff_function(SQLFunctionCtx *pCtx) { continue; } - if (pCtx->param[1].nType != INITIAL_VALUE_NOT_ASSIGNED) { // initial value is not set yet - *pOutput = (int8_t)(pData[i] - pCtx->param[1].i64); // direct previous may be null + if (pDiffInfo->valueAssigned) { // initial value is not set yet + *pOutput = (int8_t)(pData[i] - pDiffInfo->i64Prev); // direct previous may be null *pTimestamp = (tsList != NULL)? tsList[i]:0; pOutput += 1; pTimestamp += 1; } - pCtx->param[1].i64 = pData[i]; - pCtx->param[1].nType = pCtx->inputType; + pDiffInfo->i64Prev = pData[i]; + pDiffInfo->valueAssigned = true; notNullElems++; } break; @@ -3376,7 +3377,7 @@ static void diff_function(SQLFunctionCtx *pCtx) { } // initial value is not set yet - if (pCtx->param[1].nType == INITIAL_VALUE_NOT_ASSIGNED || notNullElems <= 0) { + if (!pDiffInfo->valueAssigned || notNullElems <= 0) { /* * 1. current block and blocks before are full of null * 2. current block may be null value diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 165ddd5219a463d2bf208fc1bd12131b6242f635..2d4920d0f8fb1b53b7bf5dd218c66f07f86ae532 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -1592,9 +1592,6 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SGroupbyOperatorInfo *pIn int32_t num = 0; for (int32_t j = 0; j < pSDataBlock->info.rows; ++j) { char* val = ((char*)pColInfoData->pData) + bytes * j; - if (isNull(val, type)) { - continue; - } // Compare with the previous row of this column, and do not set the output buffer again if they are identical. if (pInfo->prevData == NULL) { diff --git a/src/query/src/qExtbuffer.c b/src/query/src/qExtbuffer.c index 45b1f0c5534bea73502d74a758b88b1983bfc4b8..ef4b56dc877ca75fe79ac5a345e99e0a3717eff5 100644 --- a/src/query/src/qExtbuffer.c +++ b/src/query/src/qExtbuffer.c @@ -641,6 +641,89 @@ static UNUSED_FUNC void tRowModelDisplay(tOrderDescriptor *pDescriptor, int32_t printf("\n"); } +static void mergeSortIndicesByOrderColumns(tOrderDescriptor *pDescriptor, int32_t numOfRows, int32_t start, int32_t end, char *data, + int32_t orderType, __col_compar_fn_t compareFn, int32_t* indices, int32_t* aux) { + if (end <= start) { + return; + } + + + int32_t mid = start + (end-start)/2; + mergeSortIndicesByOrderColumns(pDescriptor, numOfRows, start, mid, data, orderType, compareFn, indices, aux); + mergeSortIndicesByOrderColumns(pDescriptor, numOfRows, mid+1, end, data, orderType, compareFn, indices, aux); + int32_t left = start; + int32_t right = mid + 1; + int32_t k; + for (k = start; k <= end; ++k) { + if (left == mid+1) { + aux[k] = indices[right]; + ++right; + } else if (right == end+1) { + aux[k] = indices[left]; + ++left; + } else { + int32_t ret = compareFn(pDescriptor, numOfRows, indices[left], indices[right], data); + if (ret <= 0) { + aux[k] = indices[left]; + ++left; + } else { + aux[k] = indices[right]; + ++right; + } + } + } + + for (k = start; k <= end; ++k) { + indices[k] = aux[k]; + } +} + +static void columnwiseMergeSortImpl(tOrderDescriptor *pDescriptor, int32_t numOfRows, int32_t start, int32_t end, char* data, + int32_t orderType, __col_compar_fn_t compareFn) { + int32_t* indices = malloc(numOfRows * sizeof(int32_t)); + int32_t* aux = malloc(numOfRows * sizeof(int32_t)); + + for (int32_t i = 0; i < numOfRows; ++i) { + indices[i] = i; + } + + mergeSortIndicesByOrderColumns(pDescriptor, numOfRows, 0, numOfRows-1, data, orderType, compareFn, indices, aux); + + int32_t numOfCols = pDescriptor->pColumnModel->numOfCols; + + int32_t prevLength = 0; + char* p = NULL; + + for(int32_t i = 0; i < numOfCols; ++i) { + int16_t colOffset = getColumnModelOffset(pDescriptor->pColumnModel, i); + int32_t colBytes = pDescriptor->pColumnModel->pFields[i].field.bytes; + // make sure memory buffer is enough + if (prevLength < colBytes) { + char *tmp = realloc(p, colBytes * numOfRows); + assert(tmp); + + p = tmp; + prevLength = colBytes; + } + + char* colData = data + colOffset * numOfRows; + memcpy(p, colData, colBytes * numOfRows); + + for(int32_t j = 0; j < numOfRows; ++j){ + char* dest = colData + colBytes * j; + + int32_t newPos = indices[j]; + char* src = p + (newPos * colBytes); + memcpy(dest, src, colBytes); + } + + } + + tfree(p); + tfree(aux); + tfree(indices); +} + static void columnwiseQSortImpl(tOrderDescriptor *pDescriptor, int32_t numOfRows, int32_t start, int32_t end, char *data, int32_t orderType, __col_compar_fn_t compareFn, void* buf) { #ifdef _DEBUG_VIEW @@ -742,9 +825,9 @@ static void columnwiseQSortImpl(tOrderDescriptor *pDescriptor, int32_t numOfRows } } -void tColDataQSort(tOrderDescriptor *pDescriptor, int32_t numOfRows, int32_t start, int32_t end, char *data, int32_t order) { +void tColDataQSort(tOrderDescriptor *pDescriptor, int32_t numOfRows, int32_t start, int32_t end, char *data, int32_t orderType) { // short array sort, incur another sort procedure instead of quick sort process - __col_compar_fn_t compareFn = (order == TSDB_ORDER_ASC) ? compare_sa : compare_sd; + __col_compar_fn_t compareFn = (orderType == TSDB_ORDER_ASC) ? compare_sa : compare_sd; SColumnModel* pModel = pDescriptor->pColumnModel; @@ -762,12 +845,40 @@ void tColDataQSort(tOrderDescriptor *pDescriptor, int32_t numOfRows, int32_t sta if (end - start + 1 <= 8) { tColDataInsertSort(pDescriptor, numOfRows, start, end, data, compareFn, buf); } else { - columnwiseQSortImpl(pDescriptor, numOfRows, start, end, data, order, compareFn, buf); + columnwiseQSortImpl(pDescriptor, numOfRows, start, end, data, orderType, compareFn, buf); } free(buf); } +void tColDataMergeSort(tOrderDescriptor *pDescriptor, int32_t numOfRows, int32_t start, int32_t end, char *data, int32_t orderType) { + // short array sort, incur another sort procedure instead of quick sort process + __col_compar_fn_t compareFn = (orderType == TSDB_ORDER_ASC) ? compare_sa : compare_sd; + + SColumnModel* pModel = pDescriptor->pColumnModel; + + size_t width = 0; + for(int32_t i = 0; i < pModel->numOfCols; ++i) { + SSchema1* pSchema = &pModel->pFields[i].field; + if (width < pSchema->bytes) { + width = pSchema->bytes; + } + } + + char* buf = malloc(width); + assert(width > 0 && buf != NULL); + + if (end - start + 1 <= 8) { + tColDataInsertSort(pDescriptor, numOfRows, start, end, data, compareFn, buf); + } else { + columnwiseMergeSortImpl(pDescriptor, numOfRows, start, end, data, orderType, compareFn); + } + + free(buf); +} + + + /* * deep copy of sschema */ diff --git a/src/query/src/qSqlParser.c b/src/query/src/qSqlParser.c index 88bd970eb4e5d6a0f5111105628d129744c63db1..1f6de550cfe195b15aafe970dc900681939546e4 100644 --- a/src/query/src/qSqlParser.c +++ b/src/query/src/qSqlParser.c @@ -680,7 +680,7 @@ void tSetColumnInfo(TAOS_FIELD *pField, SStrToken *pName, TAOS_FIELD *pType) { // column name is too long, set the it to be invalid. if ((int32_t) pName->n >= maxLen) { - pName->n = -1; + pField->name[0] = 0; } else { strncpy(pField->name, pName->z, pName->n); pField->name[pName->n] = 0; diff --git a/tests/pytest/fulltest.sh b/tests/pytest/fulltest.sh index c23f0614c43ddb5548a305f6761888e9b56b244c..e057c5f542cb31570c8b7c810f512634bffc53f6 100755 --- a/tests/pytest/fulltest.sh +++ b/tests/pytest/fulltest.sh @@ -171,7 +171,7 @@ python3 test.py -f tools/taosdemoTestLimitOffset.py python3 test.py -f tools/taosdemoTestTblAlt.py python3 test.py -f tools/taosdemoTestSampleData.py python3 test.py -f tools/taosdemoTestInterlace.py -python3 test.py -f tools/taosdemoTestQuery.py +# python3 test.py -f tools/taosdemoTestQuery.py # restful test for python # python3 test.py -f restful/restful_bind_db1.py @@ -218,9 +218,9 @@ python3 ./test.py -f perfbenchmark/bug3433.py python3 ./test.py -f perfbenchmark/taosdemoInsert.py #taosdemo -#python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJson.py -# python3 test.py -f tools/taosdemoAllTest/taosdemoTestQueryWithJson.py -# python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertAllType.py +python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJson.py +python3 test.py -f tools/taosdemoAllTest/taosdemoTestQueryWithJson.py +python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertAllType.py #query python3 test.py -f query/distinctOneColTb.py diff --git a/tests/pytest/functions/function_count_last_stab.py b/tests/pytest/functions/function_count_last_stab.py index 1d777c6bd314941036f542c7d0e9063e590fa7dd..cd0a9b17c2fd8c98544dca09f6a7008929225ece 100644 --- a/tests/pytest/functions/function_count_last_stab.py +++ b/tests/pytest/functions/function_count_last_stab.py @@ -42,22 +42,22 @@ class TDTestCase: % (self.ts + i, i + 1, 1, i + 1, i + 1, i + 0.1, i + 0.1, i % 2, i + 1, i + 1, i + 1, i + 1, i + 1, i + 1)) tdSql.query("select count(*),last(*) from stest group by col1") - tdSql.checkRows(10) - tdSql.checkData(0, 0, 1) - tdSql.checkData(1, 2, 2) - tdSql.checkData(1, 3, 1) + tdSql.checkRows(11) + tdSql.checkData(1, 0, 1) + tdSql.checkData(2, 2, 2) + tdSql.checkData(2, 3, 1) tdSql.query("select count(*),last(*) from stest group by col2") - tdSql.checkRows(1) - tdSql.checkData(0, 0, 10) - tdSql.checkData(0, 2, 10) - tdSql.checkData(0, 3, 1) + tdSql.checkRows(2) + tdSql.checkData(1, 0, 10) + tdSql.checkData(1, 2, 10) + tdSql.checkData(1, 3, 1) tdSql.query("select count(*),last(ts,stest.*) from stest group by col1") - tdSql.checkRows(10) - tdSql.checkData(0, 0, 1) - tdSql.checkData(0, 2, "2018-09-17 09:00:00") - tdSql.checkData(1, 4, 1) + tdSql.checkRows(11) + tdSql.checkData(1, 0, 1) + tdSql.checkData(1, 2, "2018-09-17 09:00:00") + tdSql.checkData(2, 4, 1) diff --git a/tests/pytest/tools/taosdemoAllTest/insert-1s1tnt1r.json b/tests/pytest/tools/taosdemoAllTest/insert-1s1tnt1r.json index 0068a9c30463ff39d49cbd14d15b5d84747d0a59..d73719ebe41c5f25fc2cd585bc9974d9e83a946e 100644 --- a/tests/pytest/tools/taosdemoAllTest/insert-1s1tnt1r.json +++ b/tests/pytest/tools/taosdemoAllTest/insert-1s1tnt1r.json @@ -35,7 +35,7 @@ "super_tables": [{ "name": "stb0", "child_table_exists":"no", - "childtable_count": 1000, + "childtable_count": 11, "childtable_prefix": "stb00_", "auto_create_table": "no", "batch_create_tbl_num": 1, @@ -61,7 +61,7 @@ { "name": "stb1", "child_table_exists":"no", - "childtable_count": 1000, + "childtable_count": 10, "childtable_prefix": "stb01_", "auto_create_table": "no", "batch_create_tbl_num": 10, diff --git a/tests/pytest/tools/taosdemoAllTest/insert-default.json b/tests/pytest/tools/taosdemoAllTest/insert-default.json new file mode 100644 index 0000000000000000000000000000000000000000..423f94819f6302a50835a74e7eb5bb06fbf58c94 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/insert-default.json @@ -0,0 +1,16 @@ +{ + "filetype": "insert", + "databases": [{ + "dbinfo": { + "name": "db" + }, + "super_tables": [{ + "name": "stb0", + "childtable_count": 100, + "childtable_prefix": "stb00_", + "insert_rows": 123, + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":1}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/queryQps.json b/tests/pytest/tools/taosdemoAllTest/queryQps.json index 7ebad5e2b2f5af687656c8eed041579d7de1e2c2..c2ff21ea911f09bd459648a57a7ce4609f8bfb58 100644 --- a/tests/pytest/tools/taosdemoAllTest/queryQps.json +++ b/tests/pytest/tools/taosdemoAllTest/queryQps.json @@ -17,7 +17,7 @@ "result": "./query_res0.txt" }, { - "sql": "select last_row(*) from stb00_99 ", + "sql": "select last_row(*) from stb00_9 ", "result": "./query_res1.txt" }] diff --git a/tests/pytest/tools/taosdemoAllTest/sml/1174-large-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/1174-large-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..741a9f814b8a61c692343621c3dcc1117544fbed --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/1174-large-sml.json @@ -0,0 +1,46 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "192.168.1.103", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 10, + "thread_count_create_tbl": 1, + "result_file": "1174.out", + "confirm_parameter_prompt": "no", + "num_of_records_per_req": 51, + "databases": [ + { + "dbinfo": { + "name": "gdse", + "drop": "yes", + "keep": 36500 + }, + "super_tables": [{ + "name": "model_1174", + "child_table_exists":"no", + "childtable_count": 1, + "childtable_prefix": "model_1174_", + "auto_create_table": "no", + "batch_create_tbl_num": 0, + "data_source": "sample", + "insert_mode": "sml", + "insert_rate": 0, + "insert_rows": 2592000, + "interlace_rows": 1, + "multi_thread_write_one_tbl": "no", + "number_of_tbl_in_one_sql": 0, + "max_sql_len": 1048576, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1000, + "start_timestamp": "2021-05-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "tools/taosdemoAllTest/1174.csv", + "tags_file": "tools/taosdemoAllTest/1174-tag.csv", + "columns": [{"type": "FLOAT", "count": 109}, {"type": "INT", "count": 4}, {"type": "FLOAT", "count": 8}, {"type": "INT", "count": 1}, {"type": "FLOAT", "count": 5}, {"type": "INT", "count": 47}, {"type": "BOOL", "count": 103}, {"type": "INT", "count": 2}, {"type": "TIMESTAMP", "count": 3}, {"type": "BOOL", "count": 28}, {"type": "INT", "count": 3}, {"type": "FLOAT", "count": 6}, {"type": "INT", "count": 1}, {"type": "FLOAT", "count": 7}, {"type": "BOOL", "count": 7}, {"type": "FLOAT", "count": 2}, {"type": "INT", "count": 3}, {"type": "FLOAT", "count": 3}, {"type": "INT", "count": 3}, {"type": "BOOL", "count": 1}], + "tags": [{"type": "INT", "count": 1}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/1174-large-taosc.json b/tests/pytest/tools/taosdemoAllTest/sml/1174-large-taosc.json new file mode 100644 index 0000000000000000000000000000000000000000..bb21003e9340b91496b8f96014aa7b318bb44895 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/1174-large-taosc.json @@ -0,0 +1,46 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "192.168.1.103", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 10, + "thread_count_create_tbl": 1, + "result_file": "1174.out", + "confirm_parameter_prompt": "no", + "num_of_records_per_req": 51, + "databases": [ + { + "dbinfo": { + "name": "gdse", + "drop": "yes", + "keep": 36500 + }, + "super_tables": [{ + "name": "model_1174", + "child_table_exists":"no", + "childtable_count": 1, + "childtable_prefix": "model_1174_", + "auto_create_table": "no", + "batch_create_tbl_num": 0, + "data_source": "sample", + "insert_mode": "taosc", + "insert_rate": 0, + "insert_rows": 2592000, + "interlace_rows": 1, + "multi_thread_write_one_tbl": "no", + "number_of_tbl_in_one_sql": 0, + "max_sql_len": 1048576, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1000, + "start_timestamp": "2021-05-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "tools/taosdemoAllTest/1174.csv", + "tags_file": "tools/taosdemoAllTest/1174-tag.csv", + "columns": [{"type": "FLOAT", "count": 109}, {"type": "INT", "count": 4}, {"type": "FLOAT", "count": 8}, {"type": "INT", "count": 1}, {"type": "FLOAT", "count": 5}, {"type": "INT", "count": 47}, {"type": "BOOL", "count": 103}, {"type": "INT", "count": 2}, {"type": "TIMESTAMP", "count": 3}, {"type": "BOOL", "count": 28}, {"type": "INT", "count": 3}, {"type": "FLOAT", "count": 6}, {"type": "INT", "count": 1}, {"type": "FLOAT", "count": 7}, {"type": "BOOL", "count": 7}, {"type": "FLOAT", "count": 2}, {"type": "INT", "count": 3}, {"type": "FLOAT", "count": 3}, {"type": "INT", "count": 3}, {"type": "BOOL", "count": 1}], + "tags": [{"type": "INT", "count": 1}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/1174-small-sml-random.json b/tests/pytest/tools/taosdemoAllTest/sml/1174-small-sml-random.json new file mode 100644 index 0000000000000000000000000000000000000000..615baad853987220ea2c76663327a2a783b4cdb4 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/1174-small-sml-random.json @@ -0,0 +1,46 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "192.168.1.103", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 10, + "thread_count_create_tbl": 1, + "result_file": "1174.out", + "confirm_parameter_prompt": "no", + "num_of_records_per_req": 51, + "databases": [ + { + "dbinfo": { + "name": "gdse", + "drop": "yes", + "keep": 36500 + }, + "super_tables": [{ + "name": "model_1174", + "child_table_exists":"no", + "childtable_count": 1, + "childtable_prefix": "model_1174_", + "auto_create_table": "no", + "batch_create_tbl_num": 0, + "data_source": "rand", + "insert_mode": "sml", + "insert_rate": 0, + "insert_rows": 259200, + "interlace_rows": 1, + "multi_thread_write_one_tbl": "no", + "number_of_tbl_in_one_sql": 0, + "max_sql_len": 1048576, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1000, + "start_timestamp": "2021-05-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "tools/taosdemoAllTest/1174.csv", + "tags_file": "tools/taosdemoAllTest/1174-tag.csv", + "columns": [{"type": "FLOAT", "count": 109}, {"type": "INT", "count": 4}, {"type": "FLOAT", "count": 8}, {"type": "INT", "count": 1}, {"type": "FLOAT", "count": 5}, {"type": "INT", "count": 47}, {"type": "BOOL", "count": 103}, {"type": "INT", "count": 2}, {"type": "TIMESTAMP", "count": 3}, {"type": "BOOL", "count": 28}, {"type": "INT", "count": 3}, {"type": "FLOAT", "count": 6}, {"type": "INT", "count": 1}, {"type": "FLOAT", "count": 7}, {"type": "BOOL", "count": 7}, {"type": "FLOAT", "count": 2}, {"type": "INT", "count": 3}, {"type": "FLOAT", "count": 3}, {"type": "INT", "count": 3}, {"type": "BOOL", "count": 1}], + "tags": [{"type": "INT", "count": 1}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/1174-small-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/1174-small-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..be7c182d0ebdfd377bff4a020c63a03333160b39 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/1174-small-sml.json @@ -0,0 +1,46 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "192.168.1.103", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 10, + "thread_count_create_tbl": 1, + "result_file": "1174.out", + "confirm_parameter_prompt": "no", + "num_of_records_per_req": 51, + "databases": [ + { + "dbinfo": { + "name": "gdse", + "drop": "yes", + "keep": 36500 + }, + "super_tables": [{ + "name": "model_1174", + "child_table_exists":"no", + "childtable_count": 1, + "childtable_prefix": "model_1174_", + "auto_create_table": "no", + "batch_create_tbl_num": 0, + "data_source": "sample", + "insert_mode": "sml", + "insert_rate": 0, + "insert_rows": 259200, + "interlace_rows": 1, + "multi_thread_write_one_tbl": "no", + "number_of_tbl_in_one_sql": 0, + "max_sql_len": 1048576, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1000, + "start_timestamp": "2021-05-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "tools/taosdemoAllTest/1174.csv", + "tags_file": "tools/taosdemoAllTest/1174-tag.csv", + "columns": [{"type": "FLOAT", "count": 109}, {"type": "INT", "count": 4}, {"type": "FLOAT", "count": 8}, {"type": "INT", "count": 1}, {"type": "FLOAT", "count": 5}, {"type": "INT", "count": 47}, {"type": "BOOL", "count": 103}, {"type": "INT", "count": 2}, {"type": "TIMESTAMP", "count": 3}, {"type": "BOOL", "count": 28}, {"type": "INT", "count": 3}, {"type": "FLOAT", "count": 6}, {"type": "INT", "count": 1}, {"type": "FLOAT", "count": 7}, {"type": "BOOL", "count": 7}, {"type": "FLOAT", "count": 2}, {"type": "INT", "count": 3}, {"type": "FLOAT", "count": 3}, {"type": "INT", "count": 3}, {"type": "BOOL", "count": 1}], + "tags": [{"type": "INT", "count": 1}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/1174-small-taosc.json b/tests/pytest/tools/taosdemoAllTest/sml/1174-small-taosc.json new file mode 100644 index 0000000000000000000000000000000000000000..f74ac693a90f48ce8cf0fceca61723861631d37a --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/1174-small-taosc.json @@ -0,0 +1,46 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "192.168.1.103", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 10, + "thread_count_create_tbl": 1, + "result_file": "1174.out", + "confirm_parameter_prompt": "no", + "num_of_records_per_req": 51, + "databases": [ + { + "dbinfo": { + "name": "gdse", + "drop": "yes", + "keep": 36500 + }, + "super_tables": [{ + "name": "model_1174", + "child_table_exists":"no", + "childtable_count": 1, + "childtable_prefix": "model_1174_", + "auto_create_table": "no", + "batch_create_tbl_num": 0, + "data_source": "sample", + "insert_mode": "taosc", + "insert_rate": 0, + "insert_rows": 259200, + "interlace_rows": 1, + "multi_thread_write_one_tbl": "no", + "number_of_tbl_in_one_sql": 0, + "max_sql_len": 1048576, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1000, + "start_timestamp": "2021-05-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "tools/taosdemoAllTest/1174.csv", + "tags_file": "tools/taosdemoAllTest/1174-tag.csv", + "columns": [{"type": "FLOAT", "count": 109}, {"type": "INT", "count": 4}, {"type": "FLOAT", "count": 8}, {"type": "INT", "count": 1}, {"type": "FLOAT", "count": 5}, {"type": "INT", "count": 47}, {"type": "BOOL", "count": 103}, {"type": "INT", "count": 2}, {"type": "TIMESTAMP", "count": 3}, {"type": "BOOL", "count": 28}, {"type": "INT", "count": 3}, {"type": "FLOAT", "count": 6}, {"type": "INT", "count": 1}, {"type": "FLOAT", "count": 7}, {"type": "BOOL", "count": 7}, {"type": "FLOAT", "count": 2}, {"type": "INT", "count": 3}, {"type": "FLOAT", "count": 3}, {"type": "INT", "count": 3}, {"type": "BOOL", "count": 1}], + "tags": [{"type": "INT", "count": 1}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-1s1tnt1r-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-1s1tnt1r-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..5cd06c02759ddcba93eaa8ef4ef848a9b645cbda --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-1s1tnt1r-sml.json @@ -0,0 +1,142 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10, + "num_of_records_per_req": 1, + "max_sql_len": 1024000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 10, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 1, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 100, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":1}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 20, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 200, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":1}] + }, + { + "name": "stb2", + "child_table_exists":"no", + "childtable_count": 10, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 1, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows": 100, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "DOUBLE"}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":1}] + }, + { + "name": "stb3", + "child_table_exists":"no", + "childtable_count": 10, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 1, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "json" , + "insert_rows": 100, + "childtable_limit": -1, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":1}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-1s1tntmr-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-1s1tntmr-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..0885e01782b41079ccbfb7a30a8b4d3628ba9c20 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-1s1tntmr-sml.json @@ -0,0 +1,88 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10, + "num_of_records_per_req": 1000, + "max_sql_len": 1024000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 10, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 150, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":1}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 15, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 200, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":1}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-allDataType-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-allDataType-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..5be20c28bba11ff40296d062f93ab4fda57a1f88 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-allDataType-sml.json @@ -0,0 +1,88 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10, + "num_of_records_per_req": 1000, + "max_sql_len": 1024000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 1000, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 1, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 100, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "TIMESTAMP"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 16, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 16, "count":1}], + "tags": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 16, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 16, "count":1}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 1000, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 200, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":1}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-disorder-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-disorder-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..6f24801cb04f9f515e33898fb587b95029def325 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-disorder-sml.json @@ -0,0 +1,88 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file":"./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10, + "num_of_records_per_req": 1000, + "max_sql_len": 1024000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 1, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 10, + "childtable_limit": -1, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 1, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 10, + "disorder_range": 100, + "timestamp_step": 1000, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count":1, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 1, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 10, + "childtable_limit": -1, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 100, + "disorder_range": 1, + "timestamp_step": 1000, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":10}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-drop-exist-auto-N00-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-drop-exist-auto-N00-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..92e6ec0df7a70329312676298c3b5ffccc2a8767 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-drop-exist-auto-N00-sml.json @@ -0,0 +1,181 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 100, + "num_of_records_per_req": 100, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "no", + "replica": 1, + "days": 10, + "cache": 16, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb", + "child_table_exists":"no", + "auto_create_table": "123", + "childtable_count": 20, + "childtable_prefix": "NN123_", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 5, + "childtable_limit": 40, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "now", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "TINYINT"}] + },{ + "name": "stb", + "child_table_exists":"no", + "auto_create_table": "no", + "childtable_count": 20, + "childtable_prefix": "NNN_", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 5, + "childtable_limit": 40, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "now", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "TINYINT"}] + },{ + "name": "stb", + "child_table_exists":"no", + "auto_create_table": "yes", + "childtable_count": 20, + "childtable_prefix": "NNY_", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 5, + "childtable_limit": 40, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "now", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "TINYINT"}] + },{ + "name": "stb", + "child_table_exists":"yes", + "auto_create_table": "123", + "childtable_count": 20, + "childtable_prefix": "NY123_", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 5, + "childtable_limit": 40, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "now", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "TINYINT"}] + },{ + "name": "stb", + "child_table_exists":"yes", + "auto_create_table": "no", + "childtable_count": 20, + "childtable_prefix": "NYN_", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 5, + "childtable_limit": 40, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "now", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "TINYINT"}] + },{ + "name": "stb", + "child_table_exists":"yes", + "auto_create_table": "yes", + "childtable_count": 20, + "childtable_prefix": "NYY_", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 5, + "childtable_limit": 40, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "now", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "TINYINT"}] + } + ] + }] +} \ No newline at end of file diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-drop-exist-auto-Y00-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-drop-exist-auto-Y00-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..c09493ec7b892baba37a7be4addb0ce526752f07 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-drop-exist-auto-Y00-sml.json @@ -0,0 +1,181 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 100, + "num_of_records_per_req": 100, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 16, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb", + "child_table_exists":"no", + "auto_create_table": "123", + "childtable_count": 20, + "childtable_prefix": "YN123_", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 5, + "childtable_limit": 40, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "now", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "TINYINT"}] + },{ + "name": "stb", + "child_table_exists":"no", + "auto_create_table": "no", + "childtable_count": 20, + "childtable_prefix": "YNN_", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 5, + "childtable_limit": 40, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "now", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "TINYINT"}] + },{ + "name": "stb", + "child_table_exists":"no", + "auto_create_table": "yes", + "childtable_count": 20, + "childtable_prefix": "YNY_", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 5, + "childtable_limit": 40, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "now", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "TINYINT"}] + },{ + "name": "stb", + "child_table_exists":"yes", + "auto_create_table": "123", + "childtable_count": 20, + "childtable_prefix": "YY123_", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 5, + "childtable_limit": 40, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "now", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "TINYINT"}] + },{ + "name": "stb", + "child_table_exists":"yes", + "auto_create_table": "no", + "childtable_count": 20, + "childtable_prefix": "YYN_", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 5, + "childtable_limit": 40, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "now", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "TINYINT"}] + },{ + "name": "stb", + "child_table_exists":"yes", + "auto_create_table": "yes", + "childtable_count": 20, + "childtable_prefix": "YYY_", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 5, + "childtable_limit": 40, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "now", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "TINYINT"}] + } + ] + }] +} \ No newline at end of file diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-interlace-row-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-interlace-row-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..e04f2ff5e7cb24cb5384b7451712b3fe83bf18c3 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-interlace-row-sml.json @@ -0,0 +1,62 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 100, + "num_of_records_per_req": 1000, + "max_sql_len": 1024000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 100, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 20, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 150, + "childtable_limit": -1, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 151, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":10}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-interval-speed-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-interval-speed-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..4a4227adb8fdcd0cb025a10c5b6f417c921acd96 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-interval-speed-sml.json @@ -0,0 +1,88 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 100, + "interlace_rows": 0, + "num_of_records_per_req": 2000, + "max_sql_len": 1024000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 16, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 100, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 1000, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 20, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 35, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 1000, + "insert_interval": 200, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":1}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-newdb-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-newdb-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..1d29842e02c654987c50e6e73d4aec5eed48aa83 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-newdb-sml.json @@ -0,0 +1,166 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 0, + "num_of_records_per_req": 3000, + "max_sql_len": 1024000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 16, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 1 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"yes", + "childtable_count": 5, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 10, + "childtable_limit": -1, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 6, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": -1, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb2", + "child_table_exists":"no", + "childtable_count": 7, + "childtable_prefix": "stb02_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 4, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb3", + "child_table_exists":"no", + "childtable_count": 8, + "childtable_prefix": "stb03_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 2, + "childtable_offset": 7, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb4", + "child_table_exists":"no", + "childtable_count": 8, + "childtable_prefix": "stb04_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 0, + "childtable_offset": 7, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-newtable-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-newtable-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..886503a950ca18b752bfa264218bb8564ce44ae0 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-newtable-sml.json @@ -0,0 +1,166 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 0, + "num_of_records_per_req": 3000, + "max_sql_len": 1024000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "no", + "replica": 1, + "days": 10, + "cache": 16, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 1 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"yes", + "childtable_count": 5, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": -1, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-12-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 6, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": -1, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-12-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb2", + "child_table_exists":"no", + "childtable_count": 7, + "childtable_prefix": "stb02_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 4, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-12-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb3", + "child_table_exists":"no", + "childtable_count": 8, + "childtable_prefix": "stb03_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 2, + "childtable_offset": 7, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-12-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb4", + "child_table_exists":"no", + "childtable_count": 8, + "childtable_prefix": "stb04_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 30, + "childtable_limit": 0, + "childtable_offset": 7, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-12-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-nodbnodrop-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-nodbnodrop-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..ca99d135c5f466c911f3063b88fbb3e58c4e4ed4 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-nodbnodrop-sml.json @@ -0,0 +1,62 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 0, + "num_of_records_per_req": 3000, + "max_sql_len": 1024000, + "databases": [{ + "dbinfo": { + "name": "dbno", + "drop": "no", + "replica": 1, + "days": 10, + "cache": 16, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 1 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 5, + "childtable_prefix": "stb00_", + "auto_create_table": "yes", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 10, + "childtable_limit": -1, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-offset-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-offset-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..d0109b50cf449b0e7e1b258ae29723a560b1d2f6 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-offset-sml.json @@ -0,0 +1,166 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 0, + "num_of_records_per_req": 3000, + "max_sql_len": 1024000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "no", + "replica": 1, + "days": 10, + "cache": 16, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"yes", + "childtable_count": 5, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 0, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-11-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb1", + "child_table_exists":"yes", + "childtable_count": 6, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": -1, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-11-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb2", + "child_table_exists":"yes", + "childtable_count": 7, + "childtable_prefix": "stb02_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 4, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-11-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb3", + "child_table_exists":"yes", + "childtable_count": 8, + "childtable_prefix": "stb03_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 2, + "childtable_offset":7, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-11-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb4", + "child_table_exists":"yes", + "childtable_count": 8, + "childtable_prefix": "stb04_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 0, + "childtable_offset": 7, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-11-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-renewdb-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-renewdb-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..f8f3a8ee5cea1834c31ebb275a10977cd960f829 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-renewdb-sml.json @@ -0,0 +1,166 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 0, + "num_of_records_per_req": 3000, + "max_sql_len": 1024000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 16, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 1 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"yes", + "childtable_count": 5, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 10, + "childtable_limit": -1, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 6, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": -1, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb2", + "child_table_exists":"no", + "childtable_count": 7, + "childtable_prefix": "stb02_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 4, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb3", + "child_table_exists":"no", + "childtable_count": 8, + "childtable_prefix": "stb03_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 2, + "childtable_offset": 7, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb4", + "child_table_exists":"no", + "childtable_count": 8, + "childtable_prefix": "stb04_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 0, + "childtable_offset": 7, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-sample-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-sample-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..780fd60bb7e98f18a5c33798b6bb35a77e1d85db --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-sample-sml.json @@ -0,0 +1,88 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file":"./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10, + "num_of_records_per_req": 1000, + "max_sql_len": 1024000, + "databases": [{ + "dbinfo": { + "name": "dbtest123", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 1, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "sample", + "insert_mode": "sml", + "insert_rows": 10, + "childtable_limit": -1, + "childtable_offset": 0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval": 0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./tools/taosdemoAllTest/sample.csv", + "tags_file": "", + "columns": [{"type": "INT", "count":3}, {"type": "DOUBLE", "count":3}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}, {"type": "BOOL"}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count":2, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 10, + "childtable_limit": -1, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "./tools/taosdemoAllTest/tags.csv", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":10}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":3}, {"type": "BINARY", "len": 16, "count":2}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-sml-json-alltype.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-sml-json-alltype.json new file mode 100644 index 0000000000000000000000000000000000000000..2de298efa6553ec0c6de095ee0515a73e777445f --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-sml-json-alltype.json @@ -0,0 +1,270 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 50000, + "num_of_records_per_req": 50000, + "max_sql_len": 1025000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 2, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "json" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "INT", "count":1}] + }, + { + "name": "stb2", + "child_table_exists":"no", + "childtable_count": 4, + "childtable_prefix": "stb02_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "json" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "TINYINT", "count":1}], + "tags": [{"type": "TINYINT", "count":1}] + }, + { + "name": "stb3", + "child_table_exists":"no", + "childtable_count": 5, + "childtable_prefix": "stb03_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "json" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BIGINT"}], + "tags": [{"type": "BIGINT", "count":1}] + }, + { + "name": "stb4", + "child_table_exists":"no", + "childtable_count": 20, + "childtable_prefix": "stb04_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "json" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "SMALLINT"}], + "tags": [{"type": "SMALLINT", "count":1}] + }, + { + "name": "stb5", + "child_table_exists":"no", + "childtable_count": 40, + "childtable_prefix": "stb05_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "json" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "FLOAT"}], + "tags": [{"type": "FLOAT", "count":1}] + }, + { + "name": "stb6", + "child_table_exists":"no", + "childtable_count": 15, + "childtable_prefix": "stb06_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "json" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "DOUBLE"}], + "tags": [{"type": "DOUBLE", "count":1}] + }, + { + "name": "stb7", + "child_table_exists":"no", + "childtable_count": 10, + "childtable_prefix": "stb07_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "json" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [ {"type": "BOOL"}], + "tags": [{"type": "BOOL", "count":1}] + }, + { + "name": "stb8", + "child_table_exists":"no", + "childtable_count": 20, + "childtable_prefix": "stb08_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "json" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "NCHAR","len": 16, "count":1}], + "tags": [{"type": "NCHAR", "count":1}] + }, + { + "name": "stb9", + "child_table_exists":"no", + "childtable_count": 3, + "childtable_prefix": "stb09_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "json" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 16, "count":1}], + "tags": [{"type": "BINARY", "count":1}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-sml-telnet-alltype.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-sml-telnet-alltype.json new file mode 100644 index 0000000000000000000000000000000000000000..ff825440e5cbfd8aa5d8d6e74538c5802af8af38 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-sml-telnet-alltype.json @@ -0,0 +1,374 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 50000, + "num_of_records_per_req": 50000, + "max_sql_len": 1025000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 2, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}], + "tags": [{"type": "INT", "count":1}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 3, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "UINT"}], + "tags": [{"type": "UINT", "count":1}] + }, + { + "name": "stb2", + "child_table_exists":"no", + "childtable_count": 4, + "childtable_prefix": "stb02_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "TINYINT", "count":1}], + "tags": [{"type": "TINYINT", "count":1}] + }, + { + "name": "stb3", + "child_table_exists":"no", + "childtable_count": 5, + "childtable_prefix": "stb03_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BIGINT"}], + "tags": [{"type": "BIGINT", "count":1}] + }, + { + "name": "stb4", + "child_table_exists":"no", + "childtable_count": 6, + "childtable_prefix": "stb04_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows":30, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "SMALLINT"}], + "tags": [{"type": "SMALLINT", "count":1}] + }, + { + "name": "stb5", + "child_table_exists":"no", + "childtable_count": 15, + "childtable_prefix": "stb05_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows":20, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "FLOAT"}], + "tags": [{"type": "FLOAT", "count":1}] + }, + { + "name": "stb6", + "child_table_exists":"no", + "childtable_count": 20, + "childtable_prefix": "stb06_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows":10, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "DOUBLE"}], + "tags": [{"type": "DOUBLE", "count":1}] + }, + { + "name": "stb7", + "child_table_exists":"no", + "childtable_count": 30, + "childtable_prefix": "stb07_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows":5, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [ {"type": "BOOL"}], + "tags": [{"type": "BOOL", "count":1}] + }, + { + "name": "stb8", + "child_table_exists":"no", + "childtable_count": 20, + "childtable_prefix": "stb08_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows":30, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "NCHAR","len": 16, "count":1}], + "tags": [{"type": "NCHAR", "count":1}] + }, + { + "name": "stb9", + "child_table_exists":"no", + "childtable_count": 3, + "childtable_prefix": "stb09_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 16, "count":1}], + "tags": [{"type": "BINARY", "count":1}] + }, + { + "name": "stb10", + "child_table_exists":"no", + "childtable_count": 3, + "childtable_prefix": "stb10_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "UBIGINT"}], + "tags": [{"type": "UBIGINT", "count":1}] + }, + { + "name": "stb11", + "child_table_exists":"no", + "childtable_count": 3, + "childtable_prefix": "stb11_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "UTINYINT"}], + "tags": [{"type": "UTINYINT", "count":1}] + }, + { + "name": "stb12", + "child_table_exists":"no", + "childtable_count": 3, + "childtable_prefix": "stb12_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows":50, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [ {"type": "USMALLINT"}], + "tags": [{"type": "USMALLINT", "count":1}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insert-timestep-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insert-timestep-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..1d496b6b46bf3df3c4312bacafbfb77125491058 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insert-timestep-sml.json @@ -0,0 +1,88 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file":"./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10, + "num_of_records_per_req": 1000, + "max_sql_len": 1024000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 10, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":10}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count":20, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 20, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "2020-11-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":10}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insertBinaryLenLarge16374AllcolLar49151-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insertBinaryLenLarge16374AllcolLar49151-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..83689d6c40e3844707cc367431f37f4f8ec144d5 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insertBinaryLenLarge16374AllcolLar49151-sml.json @@ -0,0 +1,166 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10, + "num_of_records_per_req": 10240000000, + "max_sql_len": 10240000000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 1, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 16374, "count":1}], + "tags": [{"type": "TINYINT", "count":12}, {"type": "BINARY", "len": 16, "count":2}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 1, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 12, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 16370, "count":1},{"type": "INT"}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb3", + "child_table_exists":"no", + "childtable_count": 1, + "childtable_prefix": "stb03_", + "auto_create_table": "no", + "batch_create_tbl_num": 12, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb2", + "child_table_exists":"no", + "childtable_count": 1, + "childtable_prefix": "stb02_", + "auto_create_table": "no", + "batch_create_tbl_num": 12, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }, + { + "name": "stb4", + "child_table_exists":"no", + "childtable_count": 1, + "childtable_prefix": "stb04_", + "auto_create_table": "no", + "batch_create_tbl_num": 12, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 100, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insertChildTab0-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insertChildTab0-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..28f566833fc8958d364ee867c7628d573b4bf8ee --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insertChildTab0-sml.json @@ -0,0 +1,88 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10, + "num_of_records_per_req": 10, + "max_sql_len": 10240000000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 0, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 1, "count":1}], + "tags": [{"type": "TINYINT", "count":1}, {"type": "BINARY", "len": 16, "count":2}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 10, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 12, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 2, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 1, "count":1}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insertChildTabLess0-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insertChildTabLess0-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..8f27feba6be7e3018461b0070420cc759cf8fc72 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insertChildTabLess0-sml.json @@ -0,0 +1,88 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10, + "num_of_records_per_req": 10, + "max_sql_len": 10240000000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": -1, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 1, "count":1}], + "tags": [{"type": "TINYINT", "count":1}, {"type": "BINARY", "len": 16, "count":2}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 10, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 12, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 2, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 1, "count":1}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insertColumnsAndTagNum4096-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insertColumnsAndTagNum4096-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..2e4063cf272ba18732f0e456362cb1103ba6d5c4 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insertColumnsAndTagNum4096-sml.json @@ -0,0 +1,62 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 0, + "num_of_records_per_req": 1000, + "max_sql_len": 10240000000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 10, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1000, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1004}, {"type": "BINARY", "len": 5, "count":3075}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":7}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insertColumnsAndTagNumLarge4096-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insertColumnsAndTagNumLarge4096-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..c6fe0300f535a2b9d798b09853f0ad333e3bbcfd --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insertColumnsAndTagNumLarge4096-sml.json @@ -0,0 +1,62 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10000, + "num_of_records_per_req": 10000, + "max_sql_len": 10240000000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 10, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1000, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1005}, {"type": "BINARY", "len": 16, "count":3075}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":7}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..92e88141ca09971d0d202ee488471c14e07d4cd3 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json @@ -0,0 +1,62 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10, + "num_of_records_per_req": 100, + "max_sql_len": 10240000000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 10, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1000, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":0}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":7}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..18f1a39e0afcdae3d52e4bc4a4a97e15dbcfda37 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json @@ -0,0 +1,62 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 0, + "num_of_records_per_req": 1000, + "max_sql_len": 10240000000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 10, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1000, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 1000, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1004}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":7}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml-telnet.json b/tests/pytest/tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml-telnet.json new file mode 100644 index 0000000000000000000000000000000000000000..01ec546012ad04f94cfb6224048fffd89d5cbbc8 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml-telnet.json @@ -0,0 +1,88 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 50000, + "num_of_records_per_req": 50000, + "max_sql_len": 1025000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 100, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "json" , + "insert_rows":50000, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "TINYINT", "count":1}], + "tags": [{"type": "TINYINT", "count":1}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 100, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "line_protocol": "telnet" , + "insert_rows":50000, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "TINYINT", "count":1}], + "tags": [{"type": "TINYINT", "count":1}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..d950a260f6ed3ad4a9ed53bc859304a71e5a680a --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml.json @@ -0,0 +1,86 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 50000, + "num_of_records_per_req": 50000, + "max_sql_len": 1025000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 100, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows":50000, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "TINYINT", "count":1}], + "tags": [{"type": "TINYINT", "count":1}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 100, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows":50000, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "TINYINT", "count":1}], + "tags": [{"type": "TINYINT", "count":1}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insertNumOfrecordPerReq0-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insertNumOfrecordPerReq0-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..0deed5ba5420a1dd9a1efddbb6e1e7a757dc10d0 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insertNumOfrecordPerReq0-sml.json @@ -0,0 +1,88 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10, + "num_of_records_per_req": 0, + "max_sql_len": 10240000000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 1, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 1, "count":1}], + "tags": [{"type": "TINYINT", "count":1}, {"type": "BINARY", "len": 16, "count":2}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 2, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 12, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 2, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 1, "count":1}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insertNumOfrecordPerReqless0-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insertNumOfrecordPerReqless0-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..9d1d1ee71898d5e80a7310822da00de6c4636746 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insertNumOfrecordPerReqless0-sml.json @@ -0,0 +1,88 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10, + "num_of_records_per_req": -1, + "max_sql_len": 10240000000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 1, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 1, "count":1}], + "tags": [{"type": "TINYINT", "count":1}, {"type": "BINARY", "len": 16, "count":2}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 2, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 12, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 2, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "BINARY", "len": 1, "count":1}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insertSigcolumnsNum4096-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insertSigcolumnsNum4096-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..f732d2e0c5575740dc3d1eeade05e09de8860faf --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insertSigcolumnsNum4096-sml.json @@ -0,0 +1,62 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10, + "num_of_records_per_req": 100, + "max_sql_len": 10240000000, + "databases": [{ + "dbinfo": { + "name": "db", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 10, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1000, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 0, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "DOUBLE", "count":4096}], + "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":7}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insertTagsNumLarge128-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insertTagsNumLarge128-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..24f468d719546733b900ecbd283f2904e96d222f --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insertTagsNumLarge128-sml.json @@ -0,0 +1,62 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 10, + "num_of_records_per_req": 1000000, + "max_sql_len": 1024000000, + "databases": [{ + "dbinfo": { + "name": "db1", + "drop": "yes", + "replica": 1, + "days": 10, + "cache": 50, + "blocks": 8, + "precision": "ms", + "keep": 36500, + "minRows": 100, + "maxRows": 4096, + "comp":2, + "walLevel":1, + "cachelast":0, + "quorum":1, + "fsync":3000, + "update": 0 + }, + "super_tables": [{ + "name": "stb0", + "child_table_exists":"no", + "childtable_count": 10, + "childtable_prefix": "stb00_", + "auto_create_table": "no", + "batch_create_tbl_num": 10, + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 1000, + "childtable_limit": 0, + "childtable_offset":0, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 10000, + "insert_interval":0, + "max_sql_len": 1024000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2020-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BIGINT", "count":1}, {"type": "float", "count":1}, {"type": "double", "count":1}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}], + "tags": [{"type": "TINYINT", "count":127}, {"type": "BINARY", "len": 16, "count":2}] + }] + }] +} diff --git a/tests/pytest/tools/taosdemoAllTest/sml/insertTimestepMulRowsLargeint16-sml.json b/tests/pytest/tools/taosdemoAllTest/sml/insertTimestepMulRowsLargeint16-sml.json new file mode 100644 index 0000000000000000000000000000000000000000..07e625dad3a28929a63475aa18310ff6d5b24cc6 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/sml/insertTimestepMulRowsLargeint16-sml.json @@ -0,0 +1,65 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos", + "host": "localhost", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 4, + "thread_count_create_tbl": 4, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "databases": [ + { + "dbinfo": { + "name": "blf", + "drop": "yes" + }, + "super_tables": [ + { + "name": "p_0_topics", + "child_table_exists": "no", + "childtable_count": 10, + "childtable_prefix": "p_0_topics_", + "auto_create_table": "no", + "data_source": "rand", + "insert_mode": "sml", + "insert_rows": 525600, + "multi_thread_write_one_tbl": "no", + "interlace_rows": 1000, + "max_sql_len": 1048576, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 60000, + "start_timestamp": "2019-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [ + { + "type": "INT", + "count": 1 + }, + { + "type": "FLOAT", + "count": 1 + }, + { + "type": "BINARY", + "len": 12, + "count": 1 + } + ], + "tags": [ + { + "type": "BINARY", + "len": 12, + "count": 10 + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py index 0e68e2e88078d3239ceba8d88200e7ea5b1cffe4..1ab67e721774200f238b81c2fc6bd88564a0b3f6 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py @@ -48,21 +48,25 @@ class TDTestCase: tdLog.info("taosd found in %s" % buildPath) binPath = buildPath+ "/build/bin/" + testcaseFilename = os.path.split(__file__)[-1] + os.system("rm -rf ./insert*_res.txt*") + os.system("rm -rf tools/taosdemoAllTest/%s.sql" % testcaseFilename ) + # insert: create one or mutiple tables per sql and insert multiple rows per sql os.system("%staosdemo -f tools/taosdemoAllTest/insert-1s1tnt1r.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") - tdSql.checkData(0, 0, 1000) + tdSql.checkData(0, 0, 11) tdSql.query("select count (tbname) from stb1") - tdSql.checkData(0, 0, 1000) + tdSql.checkData(0, 0, 10) tdSql.query("select count(*) from stb00_0") tdSql.checkData(0, 0, 100) tdSql.query("select count(*) from stb0") - tdSql.checkData(0, 0, 100000) + tdSql.checkData(0, 0, 1100) tdSql.query("select count(*) from stb01_1") tdSql.checkData(0, 0, 200) tdSql.query("select count(*) from stb1") - tdSql.checkData(0, 0, 200000) + tdSql.checkData(0, 0, 2000) # restful connector insert data os.system("%staosdemo -f tools/taosdemoAllTest/insertRestful.json -y " % binPath) @@ -80,7 +84,17 @@ class TDTestCase: tdSql.query("select count(*) from stb1") tdSql.checkData(0, 0, 200) - + # default values json files + tdSql.execute("drop database if exists db") + os.system("%staosdemo -f tools/taosdemoAllTest/insert-default.json -y " % binPath) + tdSql.query("show databases;") + for i in range(tdSql.queryRows): + if tdSql.queryResult[i][0] == 'db': + tdSql.checkData(i, 2, 100) + tdSql.checkData(i, 4, 1) + tdSql.checkData(i, 6, 10) + tdSql.checkData(i, 16, 'ms') + # insert: create mutiple tables per sql and insert one rows per sql . os.system("%staosdemo -f tools/taosdemoAllTest/insert-1s1tntmr.json -y " % binPath) tdSql.execute("use db") @@ -339,9 +353,10 @@ class TDTestCase: tdSql.query('show tables like \'YYY%\'') #child_table_exists = yes, auto_create_table varies = yes tdSql.checkRows(20) - testcaseFilename = os.path.split(__file__)[-1] - os.system("rm -rf ./insert_res.txt") - os.system("rm -rf tools/taosdemoAllTest/%s.sql" % testcaseFilename ) + # rm useless files + os.system("rm -rf ./insert*_res.txt*") + + diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py new file mode 100644 index 0000000000000000000000000000000000000000..af5006bb2333bbc9d8fba4a93ebcab3f5bb13257 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py @@ -0,0 +1,264 @@ +################################################################### +# Copyright (c) 2016 by TAOS Technologies, Inc. +# All rights reserved. +# +# This file is proprietary and confidential to TAOS Technologies. +# No part of this file may be reproduced, stored, transmitted, +# disclosed or used in any form or by any means other than as +# expressly provided by the written permission from Jianhui Tao +# +################################################################### + +# -*- coding: utf-8 -*- + +import sys +import os +from util.log import * +from util.cases import * +from util.sql import * +from util.dnodes import * + + +class TDTestCase: + def init(self, conn, logSql): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(), logSql) + + def getBuildPath(self): + selfPath = os.path.dirname(os.path.realpath(__file__)) + + if ("community" in selfPath): + projPath = selfPath[:selfPath.find("community")] + else: + projPath = selfPath[:selfPath.find("tests")] + + for root, dirs, files in os.walk(projPath): + if ("taosd" in files): + rootRealPath = os.path.dirname(os.path.realpath(root)) + if ("packaging" not in rootRealPath): + buildPath = root[:len(root)-len("/build/bin")] + break + return buildPath + + def run(self): + buildPath = self.getBuildPath() + if (buildPath == ""): + tdLog.exit("taosd not found!") + else: + tdLog.info("taosd found in %s" % buildPath) + binPath = buildPath+ "/build/bin/" + + # insert: create one or mutiple tables per sql and insert multiple rows per sql + # line_protocol——telnet and json + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-1s1tnt1r-sml.json -y " % binPath) + tdSql.execute("use db") + tdSql.query("select count (tbname) from stb0") + tdSql.checkData(0, 0, 10) + tdSql.query("select count (tbname) from stb1") + tdSql.checkData(0, 0, 20) + tdSql.query("select count(*) from stb00_0") + tdSql.checkData(0, 0, 100) + tdSql.query("select count(*) from stb0") + tdSql.checkData(0, 0, 1000) + tdSql.query("select count(*) from stb01_1") + tdSql.checkData(0, 0, 200) + tdSql.query("select count(*) from stb1") + tdSql.checkData(0, 0, 4000) + + + # insert: create mutiple tables per sql and insert one rows per sql . + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-1s1tntmr-sml.json -y " % binPath) + tdSql.execute("use db") + tdSql.query("select count (tbname) from stb0") + tdSql.checkData(0, 0, 10) + tdSql.query("select count (tbname) from stb1") + tdSql.checkData(0, 0, 15) + tdSql.query("select count(*) from stb00_0") + tdSql.checkData(0, 0, 150) + tdSql.query("select count(*) from stb0") + tdSql.checkData(0, 0, 1500) + tdSql.query("select count(*) from stb01_0") + tdSql.checkData(0, 0, 200) + tdSql.query("select count(*) from stb1") + tdSql.checkData(0, 0, 3000) + + # insert: using parament "insert_interval to controls spped of insert. + # but We need to have accurate methods to control the speed, such as getting the speed value, checking the count and so on。 + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-interval-speed-sml.json -y" % binPath) + tdSql.execute("use db") + tdSql.query("select tbname from stb0") + tdSql.checkRows(100 ) + tdSql.query("select count(*) from stb00_0") + tdSql.checkData(0, 0, 20) + tdSql.query("select count(*) from stb0") + tdSql.checkData(0, 0, 2000) + tdSql.query("show stables") + tdSql.checkData(1, 4, 20) + tdSql.query("select count(*) from stb01_0") + tdSql.checkData(0, 0, 35) + tdSql.query("select count(*) from stb1") + tdSql.checkData(0, 0, 700) + + # spend 2min30s for 3 testcases. + # insert: drop and child_table_exists combination test + # insert: sml can't support parament "childtable_offset and childtable_limit" \ drop=no or child_table_exists = yes + + # os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-nodbnodrop-sml.json -y" % binPath) + # tdSql.error("show dbno.stables") + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-newdb-sml.json -y" % binPath) + tdSql.execute("use db") + tdSql.query("select count (tbname) from stb0") + tdSql.checkData(0, 0, 5) + tdSql.query("select count (tbname) from stb1") + tdSql.checkData(0, 0, 6) + tdSql.query("select count (tbname) from stb2") + tdSql.checkData(0, 0, 7) + tdSql.query("select count (tbname) from stb3") + tdSql.checkData(0, 0, 8) + tdSql.query("select count (tbname) from stb4") + tdSql.checkData(0, 0, 8) + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-renewdb-sml.json -y" % binPath) + tdSql.execute("use db") + tdSql.query("select count(*) from stb0") + tdSql.checkData(0, 0, 50) + tdSql.query("select count(*) from stb1") + tdSql.checkData(0, 0, 120) + tdSql.query("select count(*) from stb2") + tdSql.checkData(0, 0, 140) + tdSql.query("select count(*) from stb3") + tdSql.checkData(0, 0, 160) + tdSql.query("select count(*) from stb4") + tdSql.checkData(0, 0, 160) + + + # insert: let parament in json file is illegal, it'll expect error. + tdSql.execute("drop database if exists db") + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertColumnsAndTagNumLarge4096-sml.json -y " % binPath) + tdSql.error("use db") + tdSql.execute("drop database if exists db") + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertSigcolumnsNum4096-sml.json -y " % binPath) + tdSql.error("select * from db.stb0") + # tdSql.execute("drop database if exists db") + # os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertColumnsAndTagNum4096-sml.json -y " % binPath) + # tdSql.query("select count(*) from db.stb0") + # tdSql.checkData(0, 0, 10000) + tdSql.execute("drop database if exists db") + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json -y " % binPath) + tdSql.query("select count(*) from db.stb0") + tdSql.checkRows(0) + tdSql.execute("drop database if exists db") + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json -y " % binPath) + tdSql.execute("use db") + tdSql.query("show stables like 'stb0%' ") + tdSql.checkData(0, 2, 11) + tdSql.execute("drop database if exists db") + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertTagsNumLarge128-sml.json -y " % binPath) + tdSql.error("use db1") + tdSql.execute("drop database if exists db") + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertBinaryLenLarge16374AllcolLar49151-sml.json -y " % binPath) + tdSql.query("select count(*) from db.stb0") + tdSql.checkRows(1) + tdSql.query("select count(*) from db.stb1") + tdSql.checkRows(1) + tdSql.error("select * from db.stb4") + tdSql.error("select * from db.stb2") + tdSql.query("select count(*) from db.stb3") + tdSql.checkRows(1) + tdSql.execute("drop database if exists db") + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertNumOfrecordPerReq0-sml.json -y " % binPath) + tdSql.error("select count(*) from db.stb0") + tdSql.execute("drop database if exists db") + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertNumOfrecordPerReqless0-sml.json -y " % binPath) + tdSql.error("use db") + tdSql.execute("drop database if exists db") + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertChildTab0-sml.json -y " % binPath) + tdSql.error("use db") + tdSql.execute("drop database if exists db") + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertChildTabLess0-sml.json -y " % binPath) + tdSql.error("use db") + tdSql.execute("drop database if exists blf") + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertTimestepMulRowsLargeint16-sml.json -y " % binPath) + tdSql.execute("use blf") + tdSql.query("select ts from blf.p_0_topics_7 limit 262800,1") + tdSql.checkData(0, 0, "2020-03-31 12:00:00.000") + tdSql.query("select first(ts) from blf.p_0_topics_2") + tdSql.checkData(0, 0, "2019-10-01 00:00:00") + tdSql.query("select last(ts) from blf.p_0_topics_6 ") + tdSql.checkData(0, 0, "2020-09-29 23:59:00") + # it will be commented in ci because it spend too much time to insert data, but when you can excute it when you want to test this case. + # os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml.json -y " % binPath) + # tdSql.execute("use db") + # tdSql.query("select count(*) from stb0") + # tdSql.checkData(0, 0, 5000000) + # tdSql.query("select count(*) from stb1") + # tdSql.checkData(0, 0, 5000000) + # os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml-telnet.json -y " % binPath) + # tdSql.execute("use db") + # tdSql.query("select count(*) from stb0") + # tdSql.checkData(0, 0, 5000000) + # tdSql.query("select count(*) from stb1") + # tdSql.checkData(0, 0, 5000000) + + + # insert: timestamp and step + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-timestep-sml.json -y " % binPath) + tdSql.execute("use db") + tdSql.query("select count (tbname) from stb0") + tdSql.checkData(0, 0, 10) + tdSql.query("select count (tbname) from stb1") + tdSql.checkData(0, 0, 20) + tdSql.query("select last(ts) from db.stb00_0") + tdSql.checkData(0, 0, "2020-10-01 00:00:00.019000") + tdSql.query("select count(*) from stb0") + tdSql.checkData(0, 0, 200) + tdSql.query("select last(ts) from db.stb01_0") + tdSql.checkData(0, 0, "2020-11-01 00:00:00.190000") + tdSql.query("select count(*) from stb1") + tdSql.checkData(0, 0, 400) + + # # insert: disorder_ratio + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-disorder-sml.json 2>&1 -y " % binPath) + tdSql.execute("use db") + tdSql.query("select count (tbname) from stb0") + tdSql.checkData(0, 0, 1) + tdSql.query("select count (tbname) from stb1") + tdSql.checkData(0, 0, 1) + tdSql.query("select count(*) from stb0") + tdSql.checkData(0, 0, 10) + tdSql.query("select count(*) from stb1") + tdSql.checkData(0, 0, 10) + + # insert: sample json + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-sample-sml.json -y " % binPath) + tdSql.execute("use dbtest123") + tdSql.query("select c2 from stb0") + tdSql.checkData(0, 0, 2147483647) + tdSql.query("select * from stb1 where t1=-127") + tdSql.checkRows(20) + tdSql.query("select * from stb1 where t2=127") + tdSql.checkRows(10) + tdSql.query("select * from stb1 where t2=126") + tdSql.checkRows(10) + + # insert: test interlace parament + os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-interlace-row-sml.json -y " % binPath) + tdSql.execute("use db") + tdSql.query("select count (tbname) from stb0") + tdSql.checkData(0, 0, 100) + tdSql.query("select count (*) from stb0") + tdSql.checkData(0, 0, 15000) + + + testcaseFilename = os.path.split(__file__)[-1] + os.system("rm -rf ./insert_res.txt") + os.system("rm -rf tools/taosdemoAllTest/%s.sql" % testcaseFilename ) + + + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestQueryWithJson.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestQueryWithJson.py index 3a3152ecde3c4eca09d8b8583cf90bbfdc0cc31d..4025e023809d773d750314c8fa635be664b2ff76 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestQueryWithJson.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestQueryWithJson.py @@ -52,8 +52,8 @@ class TDTestCase: self.expectResult = expectResult with open("%s" % filename, 'r+') as f1: for line in f1.readlines(): - queryResult = line.strip().split()[0] - self.assertCheck(filename, queryResult, expectResult) + queryResultTaosc = line.strip().split()[0] + self.assertCheck(filename, queryResultTaosc, expectResult) # 获取restful接口查询的结果文件中的关键内容,目前的关键内容找到第一个key就跳出循,所以就只有一个数据。后续再修改多个结果文件。 def getfileDataRestful(self, filename): @@ -65,9 +65,12 @@ class TDTestCase: pattern = re.compile("{.*}") contents = pattern.search(contents).group() contentsDict = ast.literal_eval(contents) # 字符串转换为字典 - queryResult = contentsDict['data'][0][0] + queryResultRest = contentsDict['data'][0][0] break - return queryResult + else : + queryResultRest = "" + return queryResultRest + # 获取taosc接口查询次数 def queryTimesTaosc(self, filename): @@ -185,9 +188,10 @@ class TDTestCase: os.system( "%staosdemo -f tools/taosdemoAllTest/queryInsertdata.json" % binPath) - os.system( + exceptcode = os.system( "%staosdemo -f tools/taosdemoAllTest/queryQps.json" % binPath) + assert exceptcode == 0 # use illegal or out of range parameters query json file os.system( @@ -228,7 +232,7 @@ class TDTestCase: os.system("rm -rf tools/taosdemoAllTest/*.py.sql") os.system("rm -rf ./querySystemInfo*") os.system("rm -rf ./query_res*") -# os.system("rm -rf ./all_query*") + os.system("rm -rf ./all_query*") os.system("rm -rf ./test_query_res0.txt") def stop(self): diff --git a/tests/script/fullGeneralSuite.sim b/tests/script/fullGeneralSuite.sim index 1e370466989fba9227814c396a031e6efec2846c..54b8cbd652ae78f135a742716719aff3ec8e1bf3 100644 --- a/tests/script/fullGeneralSuite.sim +++ b/tests/script/fullGeneralSuite.sim @@ -41,6 +41,7 @@ run general/compute/block_dist.sim run general/compute/scalar_pow.sim run general/compute/scalar_triangle.sim run general/compute/scalar_str_concat_len.sim +run general/compute/table_group.sim run general/db/alter_option.sim run general/db/alter_tables_d2.sim run general/db/alter_tables_v1.sim diff --git a/tests/script/general/compute/table_group.sim b/tests/script/general/compute/table_group.sim new file mode 100644 index 0000000000000000000000000000000000000000..cbce7963c3ede6688a2a6d1d0934fa6dfbc7f25b --- /dev/null +++ b/tests/script/general/compute/table_group.sim @@ -0,0 +1,2485 @@ +system sh/stop_dnodes.sh + +system sh/deploy.sh -n dnode1 -i 1 +system sh/cfg.sh -n dnode1 -c walLevel -v 1 +system sh/cfg.sh -n dnode1 -c minRows -v 10 +system sh/exec.sh -n dnode1 -s start +sleep 200 +sql connect + +$db = m_db_tbg_limit +$tb = ct +$mt = st + +sql drop database $db -x step1 +step1: +sql create database $db +sql use $db +sql create table $mt ( ts timestamp, f1 int, f2 int ) tags(t int) + +$tb1 = ct1 +$tb2 = ct2 +$tb3 = ct3 +$tbnum = 3 +$rownum = 10 + +$x = 0 +while $x < $rownum + $i = 1 + while $i <= $tbnum + $tbi = $tb . $i + $inc = $x * 60 + $inc1 = $inc + $i + $ms = 1601481600000 + $inc1 + $v1 = $x * 10 + $v = $v1 + $i + sql insert into $tbi using $mt tags( $i ) values ( $ms , $v , $v ) + $i = $i + 1 + endw + $x = $x + 1 +endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT +sleep 500 +system sh/exec.sh -n dnode1 -s start +sleep 200 +sql connect +sql use $db + +$x = 0 +while $x < $rownum + $i = 1 + while $i <= $tbnum + $tbi = $tb . $i + $inc = $x * 60 + $inc1 = $inc + $i + $ms = 1601481700000 + $inc1 + $v1 = $x * 10 + $temp = $rownum * 10 + $v1 = $v1 + $temp + $v = $v1 + $i + sql insert into $tbi using $mt tags( $i ) values ( $ms , $v , $v ) + $i = $i + 1 + endw + $x = $x + 1 +endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT +sleep 500 +system sh/exec.sh -n dnode1 -s start +sql connect +sql use $db + +print execute sql select csum(f1) from st group by tbname + +sql select csum(f1) from st group by tbname + +if $rows != 60 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.001@ then + return -1 +endi +if $data01 != @1@ then + return -1 +endi +if $data02 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data11 != @12@ then + return -1 +endi +if $data12 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.121@ then + return -1 +endi +if $data21 != @33@ then + return -1 +endi +if $data22 != @ct1@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.181@ then + return -1 +endi +if $data31 != @64@ then + return -1 +endi +if $data32 != @ct1@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.241@ then + return -1 +endi +if $data41 != @105@ then + return -1 +endi +if $data42 != @ct1@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.301@ then + return -1 +endi +if $data51 != @156@ then + return -1 +endi +if $data52 != @ct1@ then + return -1 +endi +if $data60 != @20-10-01 00:00:00.361@ then + return -1 +endi +if $data61 != @217@ then + return -1 +endi +if $data62 != @ct1@ then + return -1 +endi +if $data70 != @20-10-01 00:00:00.421@ then + return -1 +endi +if $data71 != @288@ then + return -1 +endi +if $data72 != @ct1@ then + return -1 +endi +if $data80 != @20-10-01 00:00:00.481@ then + return -1 +endi +if $data81 != @369@ then + return -1 +endi +if $data82 != @ct1@ then + return -1 +endi +if $data90 != @20-10-01 00:00:00.541@ then + return -1 +endi +if $data91 != @460@ then + return -1 +endi +if $data92 != @ct1@ then + return -1 +endi +print execute sql select diff(f1) from st group by tbname + +sql select diff(f1) from st group by tbname + +if $rows != 57 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data01 != @10@ then + return -1 +endi +if $data02 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.121@ then + return -1 +endi +if $data11 != @10@ then + return -1 +endi +if $data12 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.181@ then + return -1 +endi +if $data21 != @10@ then + return -1 +endi +if $data22 != @ct1@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.241@ then + return -1 +endi +if $data31 != @10@ then + return -1 +endi +if $data32 != @ct1@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.301@ then + return -1 +endi +if $data41 != @10@ then + return -1 +endi +if $data42 != @ct1@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.361@ then + return -1 +endi +if $data51 != @10@ then + return -1 +endi +if $data52 != @ct1@ then + return -1 +endi +if $data60 != @20-10-01 00:00:00.421@ then + return -1 +endi +if $data61 != @10@ then + return -1 +endi +if $data62 != @ct1@ then + return -1 +endi +if $data70 != @20-10-01 00:00:00.481@ then + return -1 +endi +if $data71 != @10@ then + return -1 +endi +if $data72 != @ct1@ then + return -1 +endi +if $data80 != @20-10-01 00:00:00.541@ then + return -1 +endi +if $data81 != @10@ then + return -1 +endi +if $data82 != @ct1@ then + return -1 +endi +if $data90 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data91 != @10@ then + return -1 +endi +if $data92 != @ct1@ then + return -1 +endi +print execute sql select derivative(f1, 1s, 0) from st group by tbname + +sql select derivative(f1, 1s, 0) from st group by tbname + +if $rows != 57 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data01 != @166.666666667@ then + return -1 +endi +if $data02 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.121@ then + return -1 +endi +if $data11 != @166.666666667@ then + return -1 +endi +if $data12 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.181@ then + return -1 +endi +if $data21 != @166.666666667@ then + return -1 +endi +if $data22 != @ct1@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.241@ then + return -1 +endi +if $data31 != @166.666666667@ then + return -1 +endi +if $data32 != @ct1@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.301@ then + return -1 +endi +if $data41 != @166.666666667@ then + return -1 +endi +if $data42 != @ct1@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.361@ then + return -1 +endi +if $data51 != @166.666666667@ then + return -1 +endi +if $data52 != @ct1@ then + return -1 +endi +if $data60 != @20-10-01 00:00:00.421@ then + return -1 +endi +if $data61 != @166.666666667@ then + return -1 +endi +if $data62 != @ct1@ then + return -1 +endi +if $data70 != @20-10-01 00:00:00.481@ then + return -1 +endi +if $data71 != @166.666666667@ then + return -1 +endi +if $data72 != @ct1@ then + return -1 +endi +if $data80 != @20-10-01 00:00:00.541@ then + return -1 +endi +if $data81 != @166.666666667@ then + return -1 +endi +if $data82 != @ct1@ then + return -1 +endi +if $data90 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data91 != @0.100542932@ then + return -1 +endi +if $data92 != @ct1@ then + return -1 +endi +print execute sql select mavg(f1,2) from st group by tbname + +sql select mavg(f1,2) from st group by tbname + +if $rows != 57 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data01 != @6.000000000@ then + return -1 +endi +if $data02 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.121@ then + return -1 +endi +if $data11 != @16.000000000@ then + return -1 +endi +if $data12 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.181@ then + return -1 +endi +if $data21 != @26.000000000@ then + return -1 +endi +if $data22 != @ct1@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.241@ then + return -1 +endi +if $data31 != @36.000000000@ then + return -1 +endi +if $data32 != @ct1@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.301@ then + return -1 +endi +if $data41 != @46.000000000@ then + return -1 +endi +if $data42 != @ct1@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.361@ then + return -1 +endi +if $data51 != @56.000000000@ then + return -1 +endi +if $data52 != @ct1@ then + return -1 +endi +if $data60 != @20-10-01 00:00:00.421@ then + return -1 +endi +if $data61 != @66.000000000@ then + return -1 +endi +if $data62 != @ct1@ then + return -1 +endi +if $data70 != @20-10-01 00:00:00.481@ then + return -1 +endi +if $data71 != @76.000000000@ then + return -1 +endi +if $data72 != @ct1@ then + return -1 +endi +if $data80 != @20-10-01 00:00:00.541@ then + return -1 +endi +if $data81 != @86.000000000@ then + return -1 +endi +if $data82 != @ct1@ then + return -1 +endi +if $data90 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data91 != @96.000000000@ then + return -1 +endi +if $data92 != @ct1@ then + return -1 +endi +print execute sql select csum(f1),t from st group by tbname + +sql select csum(f1),t from st group by tbname + +if $rows != 60 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.001@ then + return -1 +endi +if $data01 != @1@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data11 != @12@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.121@ then + return -1 +endi +if $data21 != @33@ then + return -1 +endi +if $data22 != @1@ then + return -1 +endi +if $data23 != @ct1@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.181@ then + return -1 +endi +if $data31 != @64@ then + return -1 +endi +if $data32 != @1@ then + return -1 +endi +if $data33 != @ct1@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.241@ then + return -1 +endi +if $data41 != @105@ then + return -1 +endi +if $data42 != @1@ then + return -1 +endi +if $data43 != @ct1@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.301@ then + return -1 +endi +if $data51 != @156@ then + return -1 +endi +if $data52 != @1@ then + return -1 +endi +if $data53 != @ct1@ then + return -1 +endi +if $data60 != @20-10-01 00:00:00.361@ then + return -1 +endi +if $data61 != @217@ then + return -1 +endi +if $data62 != @1@ then + return -1 +endi +if $data63 != @ct1@ then + return -1 +endi +if $data70 != @20-10-01 00:00:00.421@ then + return -1 +endi +if $data71 != @288@ then + return -1 +endi +if $data72 != @1@ then + return -1 +endi +if $data73 != @ct1@ then + return -1 +endi +if $data80 != @20-10-01 00:00:00.481@ then + return -1 +endi +if $data81 != @369@ then + return -1 +endi +if $data82 != @1@ then + return -1 +endi +if $data83 != @ct1@ then + return -1 +endi +if $data90 != @20-10-01 00:00:00.541@ then + return -1 +endi +if $data91 != @460@ then + return -1 +endi +if $data92 != @1@ then + return -1 +endi +if $data93 != @ct1@ then + return -1 +endi +print execute sql select diff(f1),t from st group by tbname + +sql select diff(f1),t from st group by tbname + +if $rows != 57 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data01 != @10@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.121@ then + return -1 +endi +if $data11 != @10@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.181@ then + return -1 +endi +if $data21 != @10@ then + return -1 +endi +if $data22 != @1@ then + return -1 +endi +if $data23 != @ct1@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.241@ then + return -1 +endi +if $data31 != @10@ then + return -1 +endi +if $data32 != @1@ then + return -1 +endi +if $data33 != @ct1@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.301@ then + return -1 +endi +if $data41 != @10@ then + return -1 +endi +if $data42 != @1@ then + return -1 +endi +if $data43 != @ct1@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.361@ then + return -1 +endi +if $data51 != @10@ then + return -1 +endi +if $data52 != @1@ then + return -1 +endi +if $data53 != @ct1@ then + return -1 +endi +if $data60 != @20-10-01 00:00:00.421@ then + return -1 +endi +if $data61 != @10@ then + return -1 +endi +if $data62 != @1@ then + return -1 +endi +if $data63 != @ct1@ then + return -1 +endi +if $data70 != @20-10-01 00:00:00.481@ then + return -1 +endi +if $data71 != @10@ then + return -1 +endi +if $data72 != @1@ then + return -1 +endi +if $data73 != @ct1@ then + return -1 +endi +if $data80 != @20-10-01 00:00:00.541@ then + return -1 +endi +if $data81 != @10@ then + return -1 +endi +if $data82 != @1@ then + return -1 +endi +if $data83 != @ct1@ then + return -1 +endi +if $data90 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data91 != @10@ then + return -1 +endi +if $data92 != @1@ then + return -1 +endi +if $data93 != @ct1@ then + return -1 +endi +print execute sql select derivative(f1, 1s, 0),t from st group by tbname + +sql select derivative(f1, 1s, 0),t from st group by tbname + +if $rows != 57 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data01 != @166.666666667@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.121@ then + return -1 +endi +if $data11 != @166.666666667@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.181@ then + return -1 +endi +if $data21 != @166.666666667@ then + return -1 +endi +if $data22 != @1@ then + return -1 +endi +if $data23 != @ct1@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.241@ then + return -1 +endi +if $data31 != @166.666666667@ then + return -1 +endi +if $data32 != @1@ then + return -1 +endi +if $data33 != @ct1@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.301@ then + return -1 +endi +if $data41 != @166.666666667@ then + return -1 +endi +if $data42 != @1@ then + return -1 +endi +if $data43 != @ct1@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.361@ then + return -1 +endi +if $data51 != @166.666666667@ then + return -1 +endi +if $data52 != @1@ then + return -1 +endi +if $data53 != @ct1@ then + return -1 +endi +if $data60 != @20-10-01 00:00:00.421@ then + return -1 +endi +if $data61 != @166.666666667@ then + return -1 +endi +if $data62 != @1@ then + return -1 +endi +if $data63 != @ct1@ then + return -1 +endi +if $data70 != @20-10-01 00:00:00.481@ then + return -1 +endi +if $data71 != @166.666666667@ then + return -1 +endi +if $data72 != @1@ then + return -1 +endi +if $data73 != @ct1@ then + return -1 +endi +if $data80 != @20-10-01 00:00:00.541@ then + return -1 +endi +if $data81 != @166.666666667@ then + return -1 +endi +if $data82 != @1@ then + return -1 +endi +if $data83 != @ct1@ then + return -1 +endi +if $data90 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data91 != @0.100542932@ then + return -1 +endi +if $data92 != @1@ then + return -1 +endi +if $data93 != @ct1@ then + return -1 +endi +print execute sql select mavg(f1,2),t from st group by tbname + +sql select mavg(f1,2),t from st group by tbname + +if $rows != 57 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data01 != @6.000000000@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.121@ then + return -1 +endi +if $data11 != @16.000000000@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.181@ then + return -1 +endi +if $data21 != @26.000000000@ then + return -1 +endi +if $data22 != @1@ then + return -1 +endi +if $data23 != @ct1@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.241@ then + return -1 +endi +if $data31 != @36.000000000@ then + return -1 +endi +if $data32 != @1@ then + return -1 +endi +if $data33 != @ct1@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.301@ then + return -1 +endi +if $data41 != @46.000000000@ then + return -1 +endi +if $data42 != @1@ then + return -1 +endi +if $data43 != @ct1@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.361@ then + return -1 +endi +if $data51 != @56.000000000@ then + return -1 +endi +if $data52 != @1@ then + return -1 +endi +if $data53 != @ct1@ then + return -1 +endi +if $data60 != @20-10-01 00:00:00.421@ then + return -1 +endi +if $data61 != @66.000000000@ then + return -1 +endi +if $data62 != @1@ then + return -1 +endi +if $data63 != @ct1@ then + return -1 +endi +if $data70 != @20-10-01 00:00:00.481@ then + return -1 +endi +if $data71 != @76.000000000@ then + return -1 +endi +if $data72 != @1@ then + return -1 +endi +if $data73 != @ct1@ then + return -1 +endi +if $data80 != @20-10-01 00:00:00.541@ then + return -1 +endi +if $data81 != @86.000000000@ then + return -1 +endi +if $data82 != @1@ then + return -1 +endi +if $data83 != @ct1@ then + return -1 +endi +if $data90 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data91 != @96.000000000@ then + return -1 +endi +if $data92 != @1@ then + return -1 +endi +if $data93 != @ct1@ then + return -1 +endi +print execute sql select csum(f1) from st group by tbname limit 2 + +sql select csum(f1) from st group by tbname limit 2 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.001@ then + return -1 +endi +if $data01 != @1@ then + return -1 +endi +if $data02 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data11 != @12@ then + return -1 +endi +if $data12 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.002@ then + return -1 +endi +if $data21 != @2@ then + return -1 +endi +if $data22 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.062@ then + return -1 +endi +if $data31 != @14@ then + return -1 +endi +if $data32 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.003@ then + return -1 +endi +if $data41 != @3@ then + return -1 +endi +if $data42 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.063@ then + return -1 +endi +if $data51 != @16@ then + return -1 +endi +if $data52 != @ct3@ then + return -1 +endi +print execute sql select diff(f1) from st group by tbname limit 2 + +sql select diff(f1) from st group by tbname limit 2 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data01 != @10@ then + return -1 +endi +if $data02 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.121@ then + return -1 +endi +if $data11 != @10@ then + return -1 +endi +if $data12 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.062@ then + return -1 +endi +if $data21 != @10@ then + return -1 +endi +if $data22 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.122@ then + return -1 +endi +if $data31 != @10@ then + return -1 +endi +if $data32 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.063@ then + return -1 +endi +if $data41 != @10@ then + return -1 +endi +if $data42 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.123@ then + return -1 +endi +if $data51 != @10@ then + return -1 +endi +if $data52 != @ct3@ then + return -1 +endi +print execute sql select derivative(f1, 1s, 0) from st group by tbname limit 2 + +sql select derivative(f1, 1s, 0) from st group by tbname limit 2 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data01 != @166.666666667@ then + return -1 +endi +if $data02 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.121@ then + return -1 +endi +if $data11 != @166.666666667@ then + return -1 +endi +if $data12 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.062@ then + return -1 +endi +if $data21 != @166.666666667@ then + return -1 +endi +if $data22 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.122@ then + return -1 +endi +if $data31 != @166.666666667@ then + return -1 +endi +if $data32 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.063@ then + return -1 +endi +if $data41 != @166.666666667@ then + return -1 +endi +if $data42 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.123@ then + return -1 +endi +if $data51 != @166.666666667@ then + return -1 +endi +if $data52 != @ct3@ then + return -1 +endi +print execute sql select mavg(f1,2) from st group by tbname limit 2 + +sql select mavg(f1,2) from st group by tbname limit 2 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data01 != @6.000000000@ then + return -1 +endi +if $data02 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.121@ then + return -1 +endi +if $data11 != @16.000000000@ then + return -1 +endi +if $data12 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.062@ then + return -1 +endi +if $data21 != @7.000000000@ then + return -1 +endi +if $data22 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.122@ then + return -1 +endi +if $data31 != @17.000000000@ then + return -1 +endi +if $data32 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.063@ then + return -1 +endi +if $data41 != @8.000000000@ then + return -1 +endi +if $data42 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.123@ then + return -1 +endi +if $data51 != @18.000000000@ then + return -1 +endi +if $data52 != @ct3@ then + return -1 +endi +print execute sql select csum(f1),t from st group by tbname limit 2 + +sql select csum(f1),t from st group by tbname limit 2 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.001@ then + return -1 +endi +if $data01 != @1@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data11 != @12@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.002@ then + return -1 +endi +if $data21 != @2@ then + return -1 +endi +if $data22 != @2@ then + return -1 +endi +if $data23 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.062@ then + return -1 +endi +if $data31 != @14@ then + return -1 +endi +if $data32 != @2@ then + return -1 +endi +if $data33 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.003@ then + return -1 +endi +if $data41 != @3@ then + return -1 +endi +if $data42 != @3@ then + return -1 +endi +if $data43 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.063@ then + return -1 +endi +if $data51 != @16@ then + return -1 +endi +if $data52 != @3@ then + return -1 +endi +if $data53 != @ct3@ then + return -1 +endi +print execute sql select diff(f1),t from st group by tbname limit 2 + +sql select diff(f1),t from st group by tbname limit 2 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data01 != @10@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.121@ then + return -1 +endi +if $data11 != @10@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.062@ then + return -1 +endi +if $data21 != @10@ then + return -1 +endi +if $data22 != @2@ then + return -1 +endi +if $data23 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.122@ then + return -1 +endi +if $data31 != @10@ then + return -1 +endi +if $data32 != @2@ then + return -1 +endi +if $data33 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.063@ then + return -1 +endi +if $data41 != @10@ then + return -1 +endi +if $data42 != @3@ then + return -1 +endi +if $data43 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.123@ then + return -1 +endi +if $data51 != @10@ then + return -1 +endi +if $data52 != @3@ then + return -1 +endi +if $data53 != @ct3@ then + return -1 +endi +print execute sql select derivative(f1, 1s, 0),t from st group by tbname limit 2 + +sql select derivative(f1, 1s, 0),t from st group by tbname limit 2 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data01 != @166.666666667@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.121@ then + return -1 +endi +if $data11 != @166.666666667@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.062@ then + return -1 +endi +if $data21 != @166.666666667@ then + return -1 +endi +if $data22 != @2@ then + return -1 +endi +if $data23 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.122@ then + return -1 +endi +if $data31 != @166.666666667@ then + return -1 +endi +if $data32 != @2@ then + return -1 +endi +if $data33 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.063@ then + return -1 +endi +if $data41 != @166.666666667@ then + return -1 +endi +if $data42 != @3@ then + return -1 +endi +if $data43 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.123@ then + return -1 +endi +if $data51 != @166.666666667@ then + return -1 +endi +if $data52 != @3@ then + return -1 +endi +if $data53 != @ct3@ then + return -1 +endi +print execute sql select mavg(f1,2),t from st group by tbname limit 2 + +sql select mavg(f1,2),t from st group by tbname limit 2 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.061@ then + return -1 +endi +if $data01 != @6.000000000@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:00:00.121@ then + return -1 +endi +if $data11 != @16.000000000@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.062@ then + return -1 +endi +if $data21 != @7.000000000@ then + return -1 +endi +if $data22 != @2@ then + return -1 +endi +if $data23 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:00:00.122@ then + return -1 +endi +if $data31 != @17.000000000@ then + return -1 +endi +if $data32 != @2@ then + return -1 +endi +if $data33 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.063@ then + return -1 +endi +if $data41 != @8.000000000@ then + return -1 +endi +if $data42 != @3@ then + return -1 +endi +if $data43 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:00:00.123@ then + return -1 +endi +if $data51 != @18.000000000@ then + return -1 +endi +if $data52 != @3@ then + return -1 +endi +if $data53 != @ct3@ then + return -1 +endi +print execute sql select csum(f1) from st group by tbname limit 2 offset 9 + +sql select csum(f1) from st group by tbname limit 2 offset 9 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.541@ then + return -1 +endi +if $data01 != @460@ then + return -1 +endi +if $data02 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data11 != @561@ then + return -1 +endi +if $data12 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.542@ then + return -1 +endi +if $data21 != @470@ then + return -1 +endi +if $data22 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:01:40.002@ then + return -1 +endi +if $data31 != @572@ then + return -1 +endi +if $data32 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.543@ then + return -1 +endi +if $data41 != @480@ then + return -1 +endi +if $data42 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:01:40.003@ then + return -1 +endi +if $data51 != @583@ then + return -1 +endi +if $data52 != @ct3@ then + return -1 +endi +print execute sql select diff(f1) from st group by tbname limit 2 offset 9 + +sql select diff(f1) from st group by tbname limit 2 offset 9 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data01 != @10@ then + return -1 +endi +if $data02 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:01:40.061@ then + return -1 +endi +if $data11 != @10@ then + return -1 +endi +if $data12 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:01:40.002@ then + return -1 +endi +if $data21 != @10@ then + return -1 +endi +if $data22 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:01:40.062@ then + return -1 +endi +if $data31 != @10@ then + return -1 +endi +if $data32 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:01:40.003@ then + return -1 +endi +if $data41 != @10@ then + return -1 +endi +if $data42 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:01:40.063@ then + return -1 +endi +if $data51 != @10@ then + return -1 +endi +if $data52 != @ct3@ then + return -1 +endi +print execute sql select derivative(f1, 1s, 0) from st group by tbname limit 2 offset 9 + +sql select derivative(f1, 1s, 0) from st group by tbname limit 2 offset 9 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data01 != @0.100542932@ then + return -1 +endi +if $data02 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:01:40.061@ then + return -1 +endi +if $data11 != @166.666666667@ then + return -1 +endi +if $data12 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:01:40.002@ then + return -1 +endi +if $data21 != @0.100542932@ then + return -1 +endi +if $data22 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:01:40.062@ then + return -1 +endi +if $data31 != @166.666666667@ then + return -1 +endi +if $data32 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:01:40.003@ then + return -1 +endi +if $data41 != @0.100542932@ then + return -1 +endi +if $data42 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:01:40.063@ then + return -1 +endi +if $data51 != @166.666666667@ then + return -1 +endi +if $data52 != @ct3@ then + return -1 +endi +print execute sql select mavg(f1,2) from st group by tbname limit 2 offset 9 + +sql select mavg(f1,2) from st group by tbname limit 2 offset 9 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data01 != @96.000000000@ then + return -1 +endi +if $data02 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:01:40.061@ then + return -1 +endi +if $data11 != @106.000000000@ then + return -1 +endi +if $data12 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:01:40.002@ then + return -1 +endi +if $data21 != @97.000000000@ then + return -1 +endi +if $data22 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:01:40.062@ then + return -1 +endi +if $data31 != @107.000000000@ then + return -1 +endi +if $data32 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:01:40.003@ then + return -1 +endi +if $data41 != @98.000000000@ then + return -1 +endi +if $data42 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:01:40.063@ then + return -1 +endi +if $data51 != @108.000000000@ then + return -1 +endi +if $data52 != @ct3@ then + return -1 +endi +print execute sql select csum(f1),t from st group by tbname limit 2 offset 9 + +sql select csum(f1),t from st group by tbname limit 2 offset 9 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.541@ then + return -1 +endi +if $data01 != @460@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data11 != @561@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.542@ then + return -1 +endi +if $data21 != @470@ then + return -1 +endi +if $data22 != @2@ then + return -1 +endi +if $data23 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:01:40.002@ then + return -1 +endi +if $data31 != @572@ then + return -1 +endi +if $data32 != @2@ then + return -1 +endi +if $data33 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.543@ then + return -1 +endi +if $data41 != @480@ then + return -1 +endi +if $data42 != @3@ then + return -1 +endi +if $data43 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:01:40.003@ then + return -1 +endi +if $data51 != @583@ then + return -1 +endi +if $data52 != @3@ then + return -1 +endi +if $data53 != @ct3@ then + return -1 +endi +print execute sql select diff(f1),t from st group by tbname limit 2 offset 9 + +sql select diff(f1),t from st group by tbname limit 2 offset 9 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data01 != @10@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:01:40.061@ then + return -1 +endi +if $data11 != @10@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:01:40.002@ then + return -1 +endi +if $data21 != @10@ then + return -1 +endi +if $data22 != @2@ then + return -1 +endi +if $data23 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:01:40.062@ then + return -1 +endi +if $data31 != @10@ then + return -1 +endi +if $data32 != @2@ then + return -1 +endi +if $data33 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:01:40.003@ then + return -1 +endi +if $data41 != @10@ then + return -1 +endi +if $data42 != @3@ then + return -1 +endi +if $data43 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:01:40.063@ then + return -1 +endi +if $data51 != @10@ then + return -1 +endi +if $data52 != @3@ then + return -1 +endi +if $data53 != @ct3@ then + return -1 +endi +print execute sql select derivative(f1, 1s, 0),t from st group by tbname limit 2 offset 9 + +sql select derivative(f1, 1s, 0),t from st group by tbname limit 2 offset 9 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data01 != @0.100542932@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:01:40.061@ then + return -1 +endi +if $data11 != @166.666666667@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:01:40.002@ then + return -1 +endi +if $data21 != @0.100542932@ then + return -1 +endi +if $data22 != @2@ then + return -1 +endi +if $data23 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:01:40.062@ then + return -1 +endi +if $data31 != @166.666666667@ then + return -1 +endi +if $data32 != @2@ then + return -1 +endi +if $data33 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:01:40.003@ then + return -1 +endi +if $data41 != @0.100542932@ then + return -1 +endi +if $data42 != @3@ then + return -1 +endi +if $data43 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:01:40.063@ then + return -1 +endi +if $data51 != @166.666666667@ then + return -1 +endi +if $data52 != @3@ then + return -1 +endi +if $data53 != @ct3@ then + return -1 +endi +print execute sql select mavg(f1,2),t from st group by tbname limit 2 offset 9 + +sql select mavg(f1,2),t from st group by tbname limit 2 offset 9 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data01 != @96.000000000@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:01:40.061@ then + return -1 +endi +if $data11 != @106.000000000@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:01:40.002@ then + return -1 +endi +if $data21 != @97.000000000@ then + return -1 +endi +if $data22 != @2@ then + return -1 +endi +if $data23 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:01:40.062@ then + return -1 +endi +if $data31 != @107.000000000@ then + return -1 +endi +if $data32 != @2@ then + return -1 +endi +if $data33 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:01:40.003@ then + return -1 +endi +if $data41 != @98.000000000@ then + return -1 +endi +if $data42 != @3@ then + return -1 +endi +if $data43 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:01:40.063@ then + return -1 +endi +if $data51 != @108.000000000@ then + return -1 +endi +if $data52 != @3@ then + return -1 +endi +if $data53 != @ct3@ then + return -1 +endi +print execute sql select csum(f1),t,tbname from st group by tbname limit 2 offset 9 + +sql select csum(f1),t,tbname from st group by tbname limit 2 offset 9 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:00:00.541@ then + return -1 +endi +if $data01 != @460@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data04 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data11 != @561@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data14 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:00:00.542@ then + return -1 +endi +if $data21 != @470@ then + return -1 +endi +if $data22 != @2@ then + return -1 +endi +if $data23 != @ct2@ then + return -1 +endi +if $data24 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:01:40.002@ then + return -1 +endi +if $data31 != @572@ then + return -1 +endi +if $data32 != @2@ then + return -1 +endi +if $data33 != @ct2@ then + return -1 +endi +if $data34 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:00:00.543@ then + return -1 +endi +if $data41 != @480@ then + return -1 +endi +if $data42 != @3@ then + return -1 +endi +if $data43 != @ct3@ then + return -1 +endi +if $data44 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:01:40.003@ then + return -1 +endi +if $data51 != @583@ then + return -1 +endi +if $data52 != @3@ then + return -1 +endi +if $data53 != @ct3@ then + return -1 +endi +if $data54 != @ct3@ then + return -1 +endi +print execute sql select diff(f1),t,tbname from st group by tbname limit 2 offset 9 + +sql select diff(f1),t,tbname from st group by tbname limit 2 offset 9 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data01 != @10@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data04 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:01:40.061@ then + return -1 +endi +if $data11 != @10@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data14 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:01:40.002@ then + return -1 +endi +if $data21 != @10@ then + return -1 +endi +if $data22 != @2@ then + return -1 +endi +if $data23 != @ct2@ then + return -1 +endi +if $data24 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:01:40.062@ then + return -1 +endi +if $data31 != @10@ then + return -1 +endi +if $data32 != @2@ then + return -1 +endi +if $data33 != @ct2@ then + return -1 +endi +if $data34 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:01:40.003@ then + return -1 +endi +if $data41 != @10@ then + return -1 +endi +if $data42 != @3@ then + return -1 +endi +if $data43 != @ct3@ then + return -1 +endi +if $data44 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:01:40.063@ then + return -1 +endi +if $data51 != @10@ then + return -1 +endi +if $data52 != @3@ then + return -1 +endi +if $data53 != @ct3@ then + return -1 +endi +if $data54 != @ct3@ then + return -1 +endi +print execute sql select derivative(f1, 1s, 0),t,tbname from st group by tbname limit 2 offset 9 + +sql select derivative(f1, 1s, 0),t,tbname from st group by tbname limit 2 offset 9 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data01 != @0.100542932@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data04 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:01:40.061@ then + return -1 +endi +if $data11 != @166.666666667@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data14 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:01:40.002@ then + return -1 +endi +if $data21 != @0.100542932@ then + return -1 +endi +if $data22 != @2@ then + return -1 +endi +if $data23 != @ct2@ then + return -1 +endi +if $data24 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:01:40.062@ then + return -1 +endi +if $data31 != @166.666666667@ then + return -1 +endi +if $data32 != @2@ then + return -1 +endi +if $data33 != @ct2@ then + return -1 +endi +if $data34 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:01:40.003@ then + return -1 +endi +if $data41 != @0.100542932@ then + return -1 +endi +if $data42 != @3@ then + return -1 +endi +if $data43 != @ct3@ then + return -1 +endi +if $data44 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:01:40.063@ then + return -1 +endi +if $data51 != @166.666666667@ then + return -1 +endi +if $data52 != @3@ then + return -1 +endi +if $data53 != @ct3@ then + return -1 +endi +if $data54 != @ct3@ then + return -1 +endi +print execute sql select mavg(f1,2),t,tbname from st group by tbname limit 2 offset 9 + +sql select mavg(f1,2),t,tbname from st group by tbname limit 2 offset 9 + +if $rows != 6 then + return -1 +endi +if $data00 != @20-10-01 00:01:40.001@ then + return -1 +endi +if $data01 != @96.000000000@ then + return -1 +endi +if $data02 != @1@ then + return -1 +endi +if $data03 != @ct1@ then + return -1 +endi +if $data04 != @ct1@ then + return -1 +endi +if $data10 != @20-10-01 00:01:40.061@ then + return -1 +endi +if $data11 != @106.000000000@ then + return -1 +endi +if $data12 != @1@ then + return -1 +endi +if $data13 != @ct1@ then + return -1 +endi +if $data14 != @ct1@ then + return -1 +endi +if $data20 != @20-10-01 00:01:40.002@ then + return -1 +endi +if $data21 != @97.000000000@ then + return -1 +endi +if $data22 != @2@ then + return -1 +endi +if $data23 != @ct2@ then + return -1 +endi +if $data24 != @ct2@ then + return -1 +endi +if $data30 != @20-10-01 00:01:40.062@ then + return -1 +endi +if $data31 != @107.000000000@ then + return -1 +endi +if $data32 != @2@ then + return -1 +endi +if $data33 != @ct2@ then + return -1 +endi +if $data34 != @ct2@ then + return -1 +endi +if $data40 != @20-10-01 00:01:40.003@ then + return -1 +endi +if $data41 != @98.000000000@ then + return -1 +endi +if $data42 != @3@ then + return -1 +endi +if $data43 != @ct3@ then + return -1 +endi +if $data44 != @ct3@ then + return -1 +endi +if $data50 != @20-10-01 00:01:40.063@ then + return -1 +endi +if $data51 != @108.000000000@ then + return -1 +endi +if $data52 != @3@ then + return -1 +endi +if $data53 != @ct3@ then + return -1 +endi +if $data54 != @ct3@ then + return -1 +endi +print ================================ clear +#sql drop database $db +#sql show databases +#if $rows != 0 then +# return -1 +#endi + +#system sh/exec.sh -n dnode1 -s stop -x SIGINT + diff --git a/tests/script/general/compute/testSuite.sim b/tests/script/general/compute/testSuite.sim index 66f7773d22924468a3ee621640a5859cd05fddde..30a364d77bb3c409f710128463730613280e97e8 100644 --- a/tests/script/general/compute/testSuite.sim +++ b/tests/script/general/compute/testSuite.sim @@ -23,3 +23,4 @@ run general/compute/block_dist.sim run general/compute/scalar_pow.sim run general/compute/scalar_triangle.sim run general/compute/scalar_str_concat_len.sim +run general/compute/table_group.sim diff --git a/tests/script/general/parser/col_arithmetic_query.sim b/tests/script/general/parser/col_arithmetic_query.sim index 502de9583e9727d2dbee4a5601f974d6a46173ba..9b0dc8e964cf39909b803fe5ea20a7bdff8ceb59 100644 --- a/tests/script/general/parser/col_arithmetic_query.sim +++ b/tests/script/general/parser/col_arithmetic_query.sim @@ -561,19 +561,19 @@ endi sql_error select first(c6) - last(c6) *12 / count(*) from $stb group by c3; sql select first(c6) - last(c6) *12 / count(*) from $stb group by c5; -if $rows != 10 then +if $rows != 11 then return -1 endi -if $data00 != 0.000000000 then +if $data00 != -0.002160000 then return -1 endi -if $data10 != 0.997600000 then +if $data10 != 0.000000000 then return -1 endi -if $data90 != 8.978400000 then +if $data90 != 7.980800000 then return -1 endi diff --git a/tests/script/general/parser/nestquery.sim b/tests/script/general/parser/nestquery.sim index 22f18179a418b5779993c91a17d62848674e1774..25cc8a4ee8774fc7b43234d54d06abdc56af61f8 100644 --- a/tests/script/general/parser/nestquery.sim +++ b/tests/script/general/parser/nestquery.sim @@ -181,7 +181,7 @@ endi sql_error select stddev(c1) from (select c1 from nest_tb0); sql_error select percentile(c1, 20) from (select * from nest_tb0); -sql_error select interp(c1) from (select * from nest_tb0); +#sql_error select interp(c1) from (select * from nest_tb0); sql_error select derivative(val, 1s, 0) from (select c1 val from nest_tb0); sql_error select twa(c1) from (select c1 from nest_tb0); sql_error select irate(c1) from (select c1 from nest_tb0); @@ -925,5 +925,18 @@ if $data00 != 24 then return -1 endi +sql select sum(a)/sum(b) from meters where ts >= '2021-09-30 15:00:00.000' and ts <= '2021-09-30 15:00:05.000' interval(1s) fill(null) group by area order by area; +if $rows != 12 then + return -1 +endi +if $data00 != @21-09-30 15:00:00.000@ then + return -1 +endi +if $data01 != NULL then + return -1 +endi +if $data02 != 0 then + return -1 +endi system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 2696b93acedd8c116dfd0922798012c27c8e8692..9a8f602901507bc4fc31d3902461394446a3067b 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -414,6 +414,7 @@ cd ../../../debug; make ./test.sh -f general/parser/between_and.sim ./test.sh -f general/parser/last_cache.sim ./test.sh -f unique/big/balance.sim +./test.sh -f general/parser/nestquery.sim ./test.sh -f general/parser/udf.sim ./test.sh -f general/parser/udf_dll.sim diff --git a/tests/script/regressionSuite.sim b/tests/script/regressionSuite.sim index bafacb69d2d685554148783d23623bfeeb1042c5..457a47c57e7dccb24271ba2588233f149b337e15 100644 --- a/tests/script/regressionSuite.sim +++ b/tests/script/regressionSuite.sim @@ -41,6 +41,7 @@ run general/compute/block_dist.sim run general/compute/scalar_pow.sim run general/compute/scalar_triangle.sim run general/compute/scalar_str_concat_len.sim +run general/compute/table_group.sim run general/db/alter_option.sim run general/db/alter_tables_d2.sim run general/db/alter_tables_v1.sim