Merge pull request #28563 from taosdata/fix/main/TD-32727
fix:[TD-32727] fix bug when select interp with two more group key.
This commit is contained in:
commit
526904fdd1
|
@ -42,7 +42,7 @@ typedef struct STimeSliceOperatorInfo {
|
||||||
SRowKey prevKey;
|
SRowKey prevKey;
|
||||||
bool prevTsSet;
|
bool prevTsSet;
|
||||||
uint64_t groupId;
|
uint64_t groupId;
|
||||||
SGroupKeys* pPrevGroupKey;
|
SArray* pPrevGroupKeys;
|
||||||
SSDataBlock* pNextGroupRes;
|
SSDataBlock* pNextGroupRes;
|
||||||
SSDataBlock* pRemainRes; // save block unfinished processing
|
SSDataBlock* pRemainRes; // save block unfinished processing
|
||||||
int32_t remainIndex; // the remaining index in the block to be processed
|
int32_t remainIndex; // the remaining index in the block to be processed
|
||||||
|
@ -288,6 +288,7 @@ static bool genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp
|
||||||
|
|
||||||
// output the result
|
// output the result
|
||||||
int32_t fillColIndex = 0;
|
int32_t fillColIndex = 0;
|
||||||
|
int32_t groupKeyIndex = 0;
|
||||||
bool hasInterp = true;
|
bool hasInterp = true;
|
||||||
for (int32_t j = 0; j < pExprSup->numOfExprs; ++j) {
|
for (int32_t j = 0; j < pExprSup->numOfExprs; ++j) {
|
||||||
SExprInfo* pExprInfo = &pExprSup->pExprInfo[j];
|
SExprInfo* pExprInfo = &pExprSup->pExprInfo[j];
|
||||||
|
@ -320,7 +321,9 @@ static bool genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp
|
||||||
QUERY_CHECK_CODE(code, lino, _end);
|
QUERY_CHECK_CODE(code, lino, _end);
|
||||||
} else if (!isSelectGroupConstValueFunc(pExprInfo)) {
|
} else if (!isSelectGroupConstValueFunc(pExprInfo)) {
|
||||||
// use stored group key
|
// use stored group key
|
||||||
SGroupKeys* pkey = pSliceInfo->pPrevGroupKey;
|
SGroupKeys *pkey = taosArrayGet(pSliceInfo->pPrevGroupKeys, groupKeyIndex);
|
||||||
|
QUERY_CHECK_NULL(pkey, code, lino, _end, terrno);
|
||||||
|
groupKeyIndex++;
|
||||||
if (pkey->isNull == false) {
|
if (pkey->isNull == false) {
|
||||||
code = colDataSetVal(pDst, rows, pkey->pData, false);
|
code = colDataSetVal(pDst, rows, pkey->pData, false);
|
||||||
QUERY_CHECK_CODE(code, lino, _end);
|
QUERY_CHECK_CODE(code, lino, _end);
|
||||||
|
@ -645,13 +648,20 @@ _end:
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void destroyGroupKey(void* pKey) {
|
||||||
|
SGroupKeys* key = (SGroupKeys*)pKey;
|
||||||
|
if (key->pData != NULL) {
|
||||||
|
taosMemoryFreeClear(key->pData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int32_t initGroupKeyKeeper(STimeSliceOperatorInfo* pInfo, SExprSupp* pExprSup) {
|
static int32_t initGroupKeyKeeper(STimeSliceOperatorInfo* pInfo, SExprSupp* pExprSup) {
|
||||||
if (pInfo->pPrevGroupKey != NULL) {
|
if (pInfo->pPrevGroupKeys != NULL) {
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
pInfo->pPrevGroupKey = taosMemoryCalloc(1, sizeof(SGroupKeys));
|
pInfo->pPrevGroupKeys = taosArrayInit(pExprSup->numOfExprs, sizeof(SGroupKeys));
|
||||||
if (pInfo->pPrevGroupKey == NULL) {
|
if (pInfo->pPrevGroupKeys == NULL) {
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -659,11 +669,19 @@ static int32_t initGroupKeyKeeper(STimeSliceOperatorInfo* pInfo, SExprSupp* pExp
|
||||||
SExprInfo* pExprInfo = &pExprSup->pExprInfo[i];
|
SExprInfo* pExprInfo = &pExprSup->pExprInfo[i];
|
||||||
|
|
||||||
if (isGroupKeyFunc(pExprInfo)) {
|
if (isGroupKeyFunc(pExprInfo)) {
|
||||||
pInfo->pPrevGroupKey->bytes = pExprInfo->base.resSchema.bytes;
|
SGroupKeys key = {.bytes = pExprInfo->base.resSchema.bytes,
|
||||||
pInfo->pPrevGroupKey->type = pExprInfo->base.resSchema.type;
|
.type = pExprInfo->base.resSchema.type,
|
||||||
pInfo->pPrevGroupKey->isNull = false;
|
.isNull = false,
|
||||||
pInfo->pPrevGroupKey->pData = taosMemoryCalloc(1, pInfo->pPrevGroupKey->bytes);
|
.pData = taosMemoryCalloc(1, pExprInfo->base.resSchema.bytes)};
|
||||||
if (!pInfo->pPrevGroupKey->pData) {
|
if (!key.pData) {
|
||||||
|
taosArrayDestroyEx(pInfo->pPrevGroupKeys, destroyGroupKey);
|
||||||
|
pInfo->pPrevGroupKeys = NULL;
|
||||||
|
return terrno;
|
||||||
|
}
|
||||||
|
if (NULL == taosArrayPush(pInfo->pPrevGroupKeys, &key)) {
|
||||||
|
taosMemoryFree(key.pData);
|
||||||
|
taosArrayDestroyEx(pInfo->pPrevGroupKeys, destroyGroupKey);
|
||||||
|
pInfo->pPrevGroupKeys = NULL;
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -910,7 +928,7 @@ static void genInterpAfterDataBlock(STimeSliceOperatorInfo* pSliceInfo, SOperato
|
||||||
SInterval* pInterval = &pSliceInfo->interval;
|
SInterval* pInterval = &pSliceInfo->interval;
|
||||||
|
|
||||||
if (pSliceInfo->fillType == TSDB_FILL_NEXT || pSliceInfo->fillType == TSDB_FILL_LINEAR ||
|
if (pSliceInfo->fillType == TSDB_FILL_NEXT || pSliceInfo->fillType == TSDB_FILL_LINEAR ||
|
||||||
pSliceInfo->pPrevGroupKey == NULL) {
|
pSliceInfo->pPrevGroupKeys == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -921,12 +939,18 @@ static void genInterpAfterDataBlock(STimeSliceOperatorInfo* pSliceInfo, SOperato
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void copyPrevGroupKey(SExprSupp* pExprSup, SGroupKeys* pGroupKey, SSDataBlock* pSrcBlock) {
|
static int32_t copyPrevGroupKey(SExprSupp* pExprSup, SArray * pGroupKeys, SSDataBlock* pSrcBlock) {
|
||||||
|
int32_t groupKeyIdx = 0;
|
||||||
for (int32_t j = 0; j < pExprSup->numOfExprs; ++j) {
|
for (int32_t j = 0; j < pExprSup->numOfExprs; ++j) {
|
||||||
SExprInfo* pExprInfo = &pExprSup->pExprInfo[j];
|
SExprInfo* pExprInfo = &pExprSup->pExprInfo[j];
|
||||||
|
|
||||||
if (isGroupKeyFunc(pExprInfo)) {
|
if (isGroupKeyFunc(pExprInfo)) {
|
||||||
int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId;
|
int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId;
|
||||||
|
SGroupKeys *pGroupKey = taosArrayGet(pGroupKeys, groupKeyIdx);
|
||||||
|
if (pGroupKey == NULL) {
|
||||||
|
return terrno;
|
||||||
|
}
|
||||||
|
groupKeyIdx++;
|
||||||
SColumnInfoData* pSrc = taosArrayGet(pSrcBlock->pDataBlock, srcSlot);
|
SColumnInfoData* pSrc = taosArrayGet(pSrcBlock->pDataBlock, srcSlot);
|
||||||
|
|
||||||
if (colDataIsNull_s(pSrc, 0)) {
|
if (colDataIsNull_s(pSrc, 0)) {
|
||||||
|
@ -942,9 +966,9 @@ static void copyPrevGroupKey(SExprSupp* pExprSup, SGroupKeys* pGroupKey, SSDataB
|
||||||
}
|
}
|
||||||
|
|
||||||
pGroupKey->isNull = false;
|
pGroupKey->isNull = false;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void resetTimesliceInfo(STimeSliceOperatorInfo* pSliceInfo) {
|
static void resetTimesliceInfo(STimeSliceOperatorInfo* pSliceInfo) {
|
||||||
|
@ -986,7 +1010,11 @@ static void doHandleTimeslice(SOperatorInfo* pOperator, SSDataBlock* pBlock) {
|
||||||
T_LONG_JMP(pTaskInfo->env, code);
|
T_LONG_JMP(pTaskInfo->env, code);
|
||||||
}
|
}
|
||||||
doTimesliceImpl(pOperator, pSliceInfo, pBlock, pTaskInfo, ignoreNull);
|
doTimesliceImpl(pOperator, pSliceInfo, pBlock, pTaskInfo, ignoreNull);
|
||||||
copyPrevGroupKey(&pOperator->exprSupp, pSliceInfo->pPrevGroupKey, pBlock);
|
code = copyPrevGroupKey(&pOperator->exprSupp, pSliceInfo->pPrevGroupKeys, pBlock);
|
||||||
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
|
qError("%s failed at line %d since %s", __func__, __LINE__, tstrerror(code));
|
||||||
|
T_LONG_JMP(pTaskInfo->env, code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t doTimesliceNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) {
|
static int32_t doTimesliceNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) {
|
||||||
|
@ -1160,7 +1188,7 @@ int32_t createTimeSliceOperatorInfo(SOperatorInfo* downstream, SPhysiNode* pPhyN
|
||||||
pInfo->prevTsSet = false;
|
pInfo->prevTsSet = false;
|
||||||
pInfo->prevKey.ts = INT64_MIN;
|
pInfo->prevKey.ts = INT64_MIN;
|
||||||
pInfo->groupId = 0;
|
pInfo->groupId = 0;
|
||||||
pInfo->pPrevGroupKey = NULL;
|
pInfo->pPrevGroupKeys = NULL;
|
||||||
pInfo->pNextGroupRes = NULL;
|
pInfo->pNextGroupRes = NULL;
|
||||||
pInfo->pRemainRes = NULL;
|
pInfo->pRemainRes = NULL;
|
||||||
pInfo->remainIndex = 0;
|
pInfo->remainIndex = 0;
|
||||||
|
@ -1233,9 +1261,9 @@ void destroyTimeSliceOperatorInfo(void* param) {
|
||||||
}
|
}
|
||||||
taosArrayDestroy(pInfo->pLinearInfo);
|
taosArrayDestroy(pInfo->pLinearInfo);
|
||||||
|
|
||||||
if (pInfo->pPrevGroupKey) {
|
if (pInfo->pPrevGroupKeys) {
|
||||||
taosMemoryFree(pInfo->pPrevGroupKey->pData);
|
taosArrayDestroyEx(pInfo->pPrevGroupKeys, destroyGroupKey);
|
||||||
taosMemoryFree(pInfo->pPrevGroupKey);
|
pInfo->pPrevGroupKeys = NULL;
|
||||||
}
|
}
|
||||||
if (pInfo->hasPk && IS_VAR_DATA_TYPE(pInfo->pkCol.type)) {
|
if (pInfo->hasPk && IS_VAR_DATA_TYPE(pInfo->pkCol.type)) {
|
||||||
taosMemoryFreeClear(pInfo->prevKey.pks[0].pData);
|
taosMemoryFreeClear(pInfo->prevKey.pks[0].pData);
|
||||||
|
|
|
@ -0,0 +1,368 @@
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (null) order by irowts;
|
||||||
|
irowts | table_name | isfilled | intp_c1 |
|
||||||
|
================================================================================
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | true | NULL |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | false | 5 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | true | NULL |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | true | NULL |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | true | NULL |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | true | NULL |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | false | 10 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | true | NULL |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | true | NULL |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | true | NULL |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | true | NULL |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | false | 15 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | true | NULL |
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (next) order by irowts;
|
||||||
|
irowts | table_name | isfilled | intp_c1 |
|
||||||
|
================================================================================
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | true | 5 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | false | 5 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | true | 10 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | true | 10 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | true | 10 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | true | 10 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | false | 10 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | true | 15 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | true | 15 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | true | 15 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | true | 15 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | false | 15 |
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (prev) order by irowts;
|
||||||
|
irowts | table_name | isfilled | intp_c1 |
|
||||||
|
================================================================================
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | false | 5 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | true | 5 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | true | 5 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | true | 5 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | true | 5 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | false | 10 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | true | 10 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | true | 10 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | true | 10 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | true | 10 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | false | 15 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | true | 15 |
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (linear) order by irowts;
|
||||||
|
irowts | table_name | isfilled | intp_c1 |
|
||||||
|
================================================================================
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | false | 5 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | true | 6 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | true | 7 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | true | 8 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | true | 9 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | false | 10 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | true | 11 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | true | 12 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | true | 13 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | true | 14 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | false | 15 |
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (value, 1) order by irowts;
|
||||||
|
irowts | table_name | isfilled | intp_c1 |
|
||||||
|
================================================================================
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | true | 1 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | false | 5 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | true | 1 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | true | 1 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | true | 1 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | true | 1 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | false | 10 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | true | 1 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | true | 1 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | true | 1 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | true | 1 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | false | 15 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | true | 1 |
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (null) order by irowts, c2;
|
||||||
|
irowts | table_name | c_c2 | isfilled | intp_c1 |
|
||||||
|
==============================================================================================
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 5 | false | 5 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 10 | false | 10 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 15 | false | 15 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 15 | true | NULL |
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (next) order by irowts, c2;
|
||||||
|
irowts | table_name | c_c2 | isfilled | intp_c1 |
|
||||||
|
==============================================================================================
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 5 | false | 5 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 10 | false | 10 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 15 | false | 15 |
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (prev) order by irowts, c2;
|
||||||
|
irowts | table_name | c_c2 | isfilled | intp_c1 |
|
||||||
|
==============================================================================================
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 5 | false | 5 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 10 | false | 10 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 15 | false | 15 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 15 | true | 15 |
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (linear) order by irowts, c2;
|
||||||
|
irowts | table_name | c_c2 | isfilled | intp_c1 |
|
||||||
|
==============================================================================================
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 5 | false | 5 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 10 | false | 10 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 15 | false | 15 |
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (value, 1) order by irowts, c2;
|
||||||
|
irowts | table_name | c_c2 | isfilled | intp_c1 |
|
||||||
|
==============================================================================================
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 5 | false | 5 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 10 | false | 10 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 15 | false | 15 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 15 | true | 1 |
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (null) order by irowts, c2, c3;
|
||||||
|
irowts | table_name | c_c2 | c_c3 | isfilled | intp_c1 |
|
||||||
|
======================================================================================================================
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 5 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 10 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 15 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 5 | 5 | false | 5 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 10 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 15 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 5 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 10 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 15 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 5 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 10 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 15 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 5 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 10 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 15 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 5 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 10 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 15 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 5 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 10 | 10 | false | 10 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 15 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 5 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 10 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 15 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 5 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 10 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 15 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 5 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 10 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 15 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 5 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 10 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 15 | 15 | true | NULL |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 5 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 10 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 15 | 15 | false | 15 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 5 | 5 | true | NULL |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 10 | 10 | true | NULL |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 15 | 15 | true | NULL |
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (next) order by irowts, c2, c3;
|
||||||
|
irowts | table_name | c_c2 | c_c3 | isfilled | intp_c1 |
|
||||||
|
======================================================================================================================
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 5 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 10 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 15 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 5 | 5 | false | 5 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 10 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 15 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 10 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 15 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 10 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 15 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 10 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 15 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 10 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 15 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 10 | 10 | false | 10 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 15 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 15 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 15 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 15 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 15 | 15 | true | 15 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 15 | 15 | false | 15 |
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (prev) order by irowts, c2, c3;
|
||||||
|
irowts | table_name | c_c2 | c_c3 | isfilled | intp_c1 |
|
||||||
|
======================================================================================================================
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 5 | 5 | false | 5 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 5 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 5 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 5 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 5 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 5 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 10 | 10 | false | 10 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 5 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 10 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 5 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 10 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 5 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 10 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 5 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 10 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 5 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 10 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 15 | 15 | false | 15 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 5 | 5 | true | 5 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 10 | 10 | true | 10 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 15 | 15 | true | 15 |
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (linear) order by irowts, c2, c3;
|
||||||
|
irowts | table_name | c_c2 | c_c3 | isfilled | intp_c1 |
|
||||||
|
======================================================================================================================
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 5 | 5 | false | 5 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 10 | 10 | false | 10 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 15 | 15 | false | 15 |
|
||||||
|
|
||||||
|
taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (value, 1) order by irowts, c2, c3;
|
||||||
|
irowts | table_name | c_c2 | c_c3 | isfilled | intp_c1 |
|
||||||
|
======================================================================================================================
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 5 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 10 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:04.000 | td32727 | 15 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 5 | 5 | false | 5 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 10 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:05.000 | td32727 | 15 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 5 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 10 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:06.000 | td32727 | 15 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 5 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 10 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:07.000 | td32727 | 15 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 5 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 10 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:08.000 | td32727 | 15 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 5 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 10 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:09.000 | td32727 | 15 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 5 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 10 | 10 | false | 10 |
|
||||||
|
2020-02-01 00:00:10.000 | td32727 | 15 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 5 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 10 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:11.000 | td32727 | 15 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 5 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 10 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:12.000 | td32727 | 15 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 5 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 10 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:13.000 | td32727 | 15 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 5 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 10 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:14.000 | td32727 | 15 | 15 | true | 1 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 5 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 10 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:15.000 | td32727 | 15 | 15 | false | 15 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 5 | 5 | true | 1 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 10 | 10 | true | 1 |
|
||||||
|
2020-02-01 00:00:16.000 | td32727 | 15 | 15 | true | 1 |
|
||||||
|
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (null) order by irowts;
|
||||||
|
select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (next) order by irowts;
|
||||||
|
select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (prev) order by irowts;
|
||||||
|
select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (linear) order by irowts;
|
||||||
|
select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (value, 1) order by irowts;
|
||||||
|
select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (null) order by irowts, c2;
|
||||||
|
select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (next) order by irowts, c2;
|
||||||
|
select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (prev) order by irowts, c2;
|
||||||
|
select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (linear) order by irowts, c2;
|
||||||
|
select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (value, 1) order by irowts, c2;
|
||||||
|
select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (null) order by irowts, c2, c3;
|
||||||
|
select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (next) order by irowts, c2, c3;
|
||||||
|
select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (prev) order by irowts, c2, c3;
|
||||||
|
select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (linear) order by irowts, c2, c3;
|
||||||
|
select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (value, 1) order by irowts, c2, c3;
|
|
@ -0,0 +1,72 @@
|
||||||
|
###################################################################
|
||||||
|
# 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 -*-
|
||||||
|
|
||||||
|
from frame import etool
|
||||||
|
from frame.etool import *
|
||||||
|
from frame.log import *
|
||||||
|
from frame.cases import *
|
||||||
|
from frame.sql import *
|
||||||
|
from frame.caseBase import *
|
||||||
|
from frame.common import *
|
||||||
|
|
||||||
|
class TDTestCase(TBase):
|
||||||
|
updatecfgDict = {
|
||||||
|
"keepColumnName": "1",
|
||||||
|
"ttlChangeOnWrite": "1",
|
||||||
|
"querySmaOptimize": "1",
|
||||||
|
"slowLogScope": "none",
|
||||||
|
"queryBufferSize": 10240
|
||||||
|
}
|
||||||
|
|
||||||
|
def insert_data(self):
|
||||||
|
tdLog.printNoPrefix("==========step1:create table")
|
||||||
|
|
||||||
|
tdSql.execute("create database test keep 36500")
|
||||||
|
tdSql.execute("use test")
|
||||||
|
tdSql.execute(
|
||||||
|
f'''create table if not exists test.td32727
|
||||||
|
(ts timestamp, c0 tinyint, c1 smallint, c2 int, c3 bigint, c4 double, c5 float, c6 bool, c7 varchar(10), c8 nchar(10), c9 tinyint unsigned, c10 smallint unsigned, c11 int unsigned, c12 bigint unsigned)
|
||||||
|
'''
|
||||||
|
)
|
||||||
|
|
||||||
|
tdLog.printNoPrefix("==========step2:insert data")
|
||||||
|
|
||||||
|
tdSql.execute(f"insert into test.td32727 values ('2020-02-01 00:00:05', 5, 5, 5, 5, 5.0, 5.0, true, 'varchar', 'nchar', 5, 5, 5, 5)")
|
||||||
|
tdSql.execute(f"insert into test.td32727 values ('2020-02-01 00:00:10', 10, 10, 10, 10, 10.0, 10.0, true, 'varchar', 'nchar', 10, 10, 10, 10)")
|
||||||
|
tdSql.execute(f"insert into test.td32727 values ('2020-02-01 00:00:15', 15, 15, 15, 15, 15.0, 15.0, true, 'varchar', 'nchar', 15, 15, 15, 15)")
|
||||||
|
|
||||||
|
|
||||||
|
def test_normal_query_new(self, testCase):
|
||||||
|
# read sql from .sql file and execute
|
||||||
|
tdLog.info("test normal query.")
|
||||||
|
self.sqlFile = etool.curFile(__file__, f"in/{testCase}.in")
|
||||||
|
self.ansFile = etool.curFile(__file__, f"ans/{testCase}.csv")
|
||||||
|
|
||||||
|
tdCom.compare_testcase_result(self.sqlFile, self.ansFile, testCase)
|
||||||
|
|
||||||
|
def test_interp(self):
|
||||||
|
self.test_normal_query_new("interp")
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
tdLog.debug(f"start to excute {__file__}")
|
||||||
|
|
||||||
|
self.insert_data()
|
||||||
|
|
||||||
|
# math function
|
||||||
|
self.test_interp()
|
||||||
|
|
||||||
|
tdLog.success(f"{__file__} successfully executed")
|
||||||
|
|
||||||
|
|
||||||
|
tdCases.addLinux(__file__, TDTestCase())
|
||||||
|
tdCases.addWindows(__file__, TDTestCase())
|
|
@ -16,6 +16,7 @@
|
||||||
,,y,army,./pytest.sh python3 ./test.py -f query/function/test_func_elapsed.py
|
,,y,army,./pytest.sh python3 ./test.py -f query/function/test_func_elapsed.py
|
||||||
,,y,army,./pytest.sh python3 ./test.py -f query/function/test_function.py
|
,,y,army,./pytest.sh python3 ./test.py -f query/function/test_function.py
|
||||||
,,y,army,./pytest.sh python3 ./test.py -f query/function/test_resinfo.py
|
,,y,army,./pytest.sh python3 ./test.py -f query/function/test_resinfo.py
|
||||||
|
,,y,army,./pytest.sh python3 ./test.py -f query/function/test_interp.py
|
||||||
,,y,army,./pytest.sh python3 ./test.py -f query/function/concat.py
|
,,y,army,./pytest.sh python3 ./test.py -f query/function/concat.py
|
||||||
,,y,army,./pytest.sh python3 ./test.py -f query/function/cast.py
|
,,y,army,./pytest.sh python3 ./test.py -f query/function/cast.py
|
||||||
,,y,army,./pytest.sh python3 ./test.py -f query/test_join.py
|
,,y,army,./pytest.sh python3 ./test.py -f query/test_join.py
|
||||||
|
|
Loading…
Reference in New Issue