Merge pull request #15639 from taosdata/szhou/fix/join
fix: fix failed case of join.sim
This commit is contained in:
commit
21308d7853
|
@ -557,6 +557,7 @@ int32_t* taosGetErrno();
|
||||||
#define TSDB_CODE_PAR_INVALID_SMA_INDEX TAOS_DEF_ERROR_CODE(0, 0x2660)
|
#define TSDB_CODE_PAR_INVALID_SMA_INDEX TAOS_DEF_ERROR_CODE(0, 0x2660)
|
||||||
#define TSDB_CODE_PAR_INVALID_SELECTED_EXPR TAOS_DEF_ERROR_CODE(0, 0x2661)
|
#define TSDB_CODE_PAR_INVALID_SELECTED_EXPR TAOS_DEF_ERROR_CODE(0, 0x2661)
|
||||||
#define TSDB_CODE_PAR_GET_META_ERROR TAOS_DEF_ERROR_CODE(0, 0x2662)
|
#define TSDB_CODE_PAR_GET_META_ERROR TAOS_DEF_ERROR_CODE(0, 0x2662)
|
||||||
|
#define TSDB_CODE_PAR_NOT_UNIQUE_TABLE_ALIAS TAOS_DEF_ERROR_CODE(0, 0x2663)
|
||||||
#define TSDB_CODE_PAR_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x26FF)
|
#define TSDB_CODE_PAR_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x26FF)
|
||||||
|
|
||||||
//planner
|
//planner
|
||||||
|
|
|
@ -323,8 +323,6 @@ static void doMergeJoinImpl(struct SOperatorInfo* pOperator, SSDataBlock* pRes)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (leftTs == rightTs) {
|
if (leftTs == rightTs) {
|
||||||
mergeJoinJoinLeftRight(pOperator, pRes, nrows, pJoinInfo->pLeft, pJoinInfo->leftPos, pJoinInfo->pRight,
|
|
||||||
pJoinInfo->rightPos);
|
|
||||||
mergeJoinJoinDownstreamTsRanges(pOperator, leftTs, pRes, &nrows);
|
mergeJoinJoinDownstreamTsRanges(pOperator, leftTs, pRes, &nrows);
|
||||||
} else if (asc && leftTs < rightTs || !asc && leftTs > rightTs) {
|
} else if (asc && leftTs < rightTs || !asc && leftTs > rightTs) {
|
||||||
pJoinInfo->leftPos += 1;
|
pJoinInfo->leftPos += 1;
|
||||||
|
|
|
@ -61,16 +61,42 @@ static bool beforeHaving(ESqlClause clause) { return clause < SQL_CLAUSE_HAVING;
|
||||||
|
|
||||||
static bool afterHaving(ESqlClause clause) { return clause > SQL_CLAUSE_HAVING; }
|
static bool afterHaving(ESqlClause clause) { return clause > SQL_CLAUSE_HAVING; }
|
||||||
|
|
||||||
|
static bool hasSameTableAlias(SArray* pTables) {
|
||||||
|
if (taosArrayGetSize(pTables) < 2) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
STableNode* pTable0 = taosArrayGetP(pTables, 0);
|
||||||
|
for (int32_t i = 1; i < taosArrayGetSize(pTables); ++i) {
|
||||||
|
STableNode* pTable = taosArrayGetP(pTables, i);
|
||||||
|
if (0 == strcmp(pTable0->tableAlias, pTable->tableAlias)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static int32_t addNamespace(STranslateContext* pCxt, void* pTable) {
|
static int32_t addNamespace(STranslateContext* pCxt, void* pTable) {
|
||||||
size_t currTotalLevel = taosArrayGetSize(pCxt->pNsLevel);
|
size_t currTotalLevel = taosArrayGetSize(pCxt->pNsLevel);
|
||||||
if (currTotalLevel > pCxt->currLevel) {
|
if (currTotalLevel > pCxt->currLevel) {
|
||||||
SArray* pTables = taosArrayGetP(pCxt->pNsLevel, pCxt->currLevel);
|
SArray* pTables = taosArrayGetP(pCxt->pNsLevel, pCxt->currLevel);
|
||||||
taosArrayPush(pTables, &pTable);
|
taosArrayPush(pTables, &pTable);
|
||||||
|
if (hasSameTableAlias(pTables)) {
|
||||||
|
return generateSyntaxErrMsgExt(&pCxt->msgBuf,
|
||||||
|
TSDB_CODE_PAR_NOT_UNIQUE_TABLE_ALIAS,
|
||||||
|
"Not unique table/alias: '%s'",
|
||||||
|
((STableNode*)pTable)->tableAlias);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
do {
|
do {
|
||||||
SArray* pTables = taosArrayInit(TARRAY_MIN_SIZE, POINTER_BYTES);
|
SArray* pTables = taosArrayInit(TARRAY_MIN_SIZE, POINTER_BYTES);
|
||||||
if (pCxt->currLevel == currTotalLevel) {
|
if (pCxt->currLevel == currTotalLevel) {
|
||||||
taosArrayPush(pTables, &pTable);
|
taosArrayPush(pTables, &pTable);
|
||||||
|
if (hasSameTableAlias(pTables)) {
|
||||||
|
return generateSyntaxErrMsgExt(&pCxt->msgBuf,
|
||||||
|
TSDB_CODE_PAR_NOT_UNIQUE_TABLE_ALIAS,
|
||||||
|
"Not unique table/alias: '%s'",
|
||||||
|
((STableNode*)pTable)->tableAlias);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
taosArrayPush(pCxt->pNsLevel, &pTables);
|
taosArrayPush(pCxt->pNsLevel, &pTables);
|
||||||
++currTotalLevel;
|
++currTotalLevel;
|
||||||
|
|
|
@ -3929,6 +3929,26 @@ static EConditionType classifyCondition(SNode* pNode) {
|
||||||
: (cxt.hasTagIndexCol ? COND_TYPE_TAG_INDEX : COND_TYPE_TAG)));
|
: (cxt.hasTagIndexCol ? COND_TYPE_TAG_INDEX : COND_TYPE_TAG)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool isCondColumnsFromMultiTable(SNode* pCond) {
|
||||||
|
SNodeList* pCondCols = nodesMakeList();
|
||||||
|
int32_t code = nodesCollectColumnsFromNode(pCond, NULL, COLLECT_COL_TYPE_ALL, &pCondCols);
|
||||||
|
if (code == TSDB_CODE_SUCCESS) {
|
||||||
|
if (LIST_LENGTH(pCondCols) >= 2) {
|
||||||
|
SColumnNode* pFirstCol = (SColumnNode*)nodesListGetNode(pCondCols, 0);
|
||||||
|
SNode* pColNode = NULL;
|
||||||
|
FOREACH(pColNode, pCondCols) {
|
||||||
|
if (strcmp(((SColumnNode*)pColNode)->dbName, pFirstCol->dbName) != 0 ||
|
||||||
|
strcmp(((SColumnNode*)pColNode)->tableAlias, pFirstCol->tableAlias) != 0) {
|
||||||
|
nodesDestroyList(pCondCols);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
nodesDestroyList(pCondCols);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static int32_t partitionLogicCond(SNode** pCondition, SNode** pPrimaryKeyCond, SNode** pTagIndexCond, SNode** pTagCond,
|
static int32_t partitionLogicCond(SNode** pCondition, SNode** pPrimaryKeyCond, SNode** pTagIndexCond, SNode** pTagCond,
|
||||||
SNode** pOtherCond) {
|
SNode** pOtherCond) {
|
||||||
SLogicConditionNode* pLogicCond = (SLogicConditionNode*)(*pCondition);
|
SLogicConditionNode* pLogicCond = (SLogicConditionNode*)(*pCondition);
|
||||||
|
@ -3941,31 +3961,37 @@ static int32_t partitionLogicCond(SNode** pCondition, SNode** pPrimaryKeyCond, S
|
||||||
SNodeList* pOtherConds = NULL;
|
SNodeList* pOtherConds = NULL;
|
||||||
SNode* pCond = NULL;
|
SNode* pCond = NULL;
|
||||||
FOREACH(pCond, pLogicCond->pParameterList) {
|
FOREACH(pCond, pLogicCond->pParameterList) {
|
||||||
switch (classifyCondition(pCond)) {
|
if (isCondColumnsFromMultiTable(pCond)) {
|
||||||
case COND_TYPE_PRIMARY_KEY:
|
if (NULL != pOtherCond) {
|
||||||
if (NULL != pPrimaryKeyCond) {
|
code = nodesListMakeAppend(&pOtherConds, nodesCloneNode(pCond));
|
||||||
code = nodesListMakeAppend(&pPrimaryKeyConds, nodesCloneNode(pCond));
|
}
|
||||||
}
|
} else {
|
||||||
break;
|
switch (classifyCondition(pCond)) {
|
||||||
case COND_TYPE_TAG_INDEX:
|
case COND_TYPE_PRIMARY_KEY:
|
||||||
if (NULL != pTagIndexCond) {
|
if (NULL != pPrimaryKeyCond) {
|
||||||
code = nodesListMakeAppend(&pTagIndexConds, nodesCloneNode(pCond));
|
code = nodesListMakeAppend(&pPrimaryKeyConds, nodesCloneNode(pCond));
|
||||||
}
|
}
|
||||||
if (NULL != pTagCond) {
|
break;
|
||||||
code = nodesListMakeAppend(&pTagConds, nodesCloneNode(pCond));
|
case COND_TYPE_TAG_INDEX:
|
||||||
}
|
if (NULL != pTagIndexCond) {
|
||||||
break;
|
code = nodesListMakeAppend(&pTagIndexConds, nodesCloneNode(pCond));
|
||||||
case COND_TYPE_TAG:
|
}
|
||||||
if (NULL != pTagCond) {
|
if (NULL != pTagCond) {
|
||||||
code = nodesListMakeAppend(&pTagConds, nodesCloneNode(pCond));
|
code = nodesListMakeAppend(&pTagConds, nodesCloneNode(pCond));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case COND_TYPE_NORMAL:
|
case COND_TYPE_TAG:
|
||||||
default:
|
if (NULL != pTagCond) {
|
||||||
if (NULL != pOtherCond) {
|
code = nodesListMakeAppend(&pTagConds, nodesCloneNode(pCond));
|
||||||
code = nodesListMakeAppend(&pOtherConds, nodesCloneNode(pCond));
|
}
|
||||||
}
|
break;
|
||||||
break;
|
case COND_TYPE_NORMAL:
|
||||||
|
default:
|
||||||
|
if (NULL != pOtherCond) {
|
||||||
|
code = nodesListMakeAppend(&pOtherConds, nodesCloneNode(pCond));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (TSDB_CODE_SUCCESS != code) {
|
if (TSDB_CODE_SUCCESS != code) {
|
||||||
break;
|
break;
|
||||||
|
@ -4026,43 +4052,50 @@ int32_t filterPartitionCond(SNode** pCondition, SNode** pPrimaryKeyCond, SNode**
|
||||||
}
|
}
|
||||||
|
|
||||||
bool needOutput = false;
|
bool needOutput = false;
|
||||||
switch (classifyCondition(*pCondition)) {
|
if (isCondColumnsFromMultiTable(*pCondition)) {
|
||||||
case COND_TYPE_PRIMARY_KEY:
|
if (NULL != pOtherCond) {
|
||||||
if (NULL != pPrimaryKeyCond) {
|
*pOtherCond = *pCondition;
|
||||||
*pPrimaryKeyCond = *pCondition;
|
needOutput = true;
|
||||||
needOutput = true;
|
}
|
||||||
}
|
} else {
|
||||||
break;
|
switch (classifyCondition(*pCondition)) {
|
||||||
case COND_TYPE_TAG_INDEX:
|
case COND_TYPE_PRIMARY_KEY:
|
||||||
if (NULL != pTagIndexCond) {
|
if (NULL != pPrimaryKeyCond) {
|
||||||
*pTagIndexCond = *pCondition;
|
*pPrimaryKeyCond = *pCondition;
|
||||||
needOutput = true;
|
needOutput = true;
|
||||||
}
|
|
||||||
if (NULL != pTagCond) {
|
|
||||||
SNode* pTempCond = *pCondition;
|
|
||||||
if (NULL != pTagIndexCond) {
|
|
||||||
pTempCond = nodesCloneNode(*pCondition);
|
|
||||||
if (NULL == pTempCond) {
|
|
||||||
return TSDB_CODE_OUT_OF_MEMORY;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
*pTagCond = pTempCond;
|
break;
|
||||||
needOutput = true;
|
case COND_TYPE_TAG_INDEX:
|
||||||
}
|
if (NULL != pTagIndexCond) {
|
||||||
break;
|
*pTagIndexCond = *pCondition;
|
||||||
case COND_TYPE_TAG:
|
needOutput = true;
|
||||||
if (NULL != pTagCond) {
|
}
|
||||||
*pTagCond = *pCondition;
|
if (NULL != pTagCond) {
|
||||||
needOutput = true;
|
SNode *pTempCond = *pCondition;
|
||||||
}
|
if (NULL != pTagIndexCond) {
|
||||||
break;
|
pTempCond = nodesCloneNode(*pCondition);
|
||||||
case COND_TYPE_NORMAL:
|
if (NULL == pTempCond) {
|
||||||
default:
|
return TSDB_CODE_OUT_OF_MEMORY;
|
||||||
if (NULL != pOtherCond) {
|
}
|
||||||
*pOtherCond = *pCondition;
|
}
|
||||||
needOutput = true;
|
*pTagCond = pTempCond;
|
||||||
}
|
needOutput = true;
|
||||||
break;
|
}
|
||||||
|
break;
|
||||||
|
case COND_TYPE_TAG:
|
||||||
|
if (NULL != pTagCond) {
|
||||||
|
*pTagCond = *pCondition;
|
||||||
|
needOutput = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case COND_TYPE_NORMAL:
|
||||||
|
default:
|
||||||
|
if (NULL != pOtherCond) {
|
||||||
|
*pOtherCond = *pCondition;
|
||||||
|
needOutput = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (needOutput) {
|
if (needOutput) {
|
||||||
*pCondition = NULL;
|
*pCondition = NULL;
|
||||||
|
|
|
@ -561,6 +561,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_PAR_ONLY_SUPPORT_SINGLE_TABLE, "Only support single
|
||||||
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_SMA_INDEX, "Invalid sma index")
|
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_SMA_INDEX, "Invalid sma index")
|
||||||
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_SELECTED_EXPR, "Invalid SELECTed expression")
|
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_SELECTED_EXPR, "Invalid SELECTed expression")
|
||||||
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_GET_META_ERROR, "Fail to get table info")
|
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_GET_META_ERROR, "Fail to get table info")
|
||||||
|
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_NOT_UNIQUE_TABLE_ALIAS, "Not unique table/alias")
|
||||||
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INTERNAL_ERROR, "Parser internal error")
|
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INTERNAL_ERROR, "Parser internal error")
|
||||||
|
|
||||||
//planner
|
//planner
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
./test.sh -f tsim/parser/join_manyblocks.sim
|
./test.sh -f tsim/parser/join_manyblocks.sim
|
||||||
# TD-18018 ./test.sh -f tsim/parser/join_multitables.sim
|
# TD-18018 ./test.sh -f tsim/parser/join_multitables.sim
|
||||||
./test.sh -f tsim/parser/join_multivnode.sim
|
./test.sh -f tsim/parser/join_multivnode.sim
|
||||||
# TD-17707 ./test.sh -f tsim/parser/join.sim
|
./test.sh -f tsim/parser/join.sim
|
||||||
./test.sh -f tsim/parser/last_cache.sim
|
./test.sh -f tsim/parser/last_cache.sim
|
||||||
./test.sh -f tsim/parser/last_groupby.sim
|
./test.sh -f tsim/parser/last_groupby.sim
|
||||||
./test.sh -f tsim/parser/lastrow.sim
|
./test.sh -f tsim/parser/lastrow.sim
|
||||||
|
|
|
@ -320,7 +320,7 @@ sql_error select count(join_tb1.c3), last(join_tb1.c3) from $tb1 , $tb2 where jo
|
||||||
sql_error select count(join_tb3.*) from $tb1 , $tb2 where join_tb1.ts = join_tb0.ts and join_tb1.ts <= 100002 and join_tb0.c7 = true;
|
sql_error select count(join_tb3.*) from $tb1 , $tb2 where join_tb1.ts = join_tb0.ts and join_tb1.ts <= 100002 and join_tb0.c7 = true;
|
||||||
sql_error select first(join_tb1.*) from $tb1 , $tb2 where join_tb1.ts = join_tb0.ts and join_tb1.ts <= 100002 or join_tb0.c7 = true;
|
sql_error select first(join_tb1.*) from $tb1 , $tb2 where join_tb1.ts = join_tb0.ts and join_tb1.ts <= 100002 or join_tb0.c7 = true;
|
||||||
sql_error select join_tb3.* from $tb1 , $tb2 where join_tb1.ts = join_tb0.ts and join_tb1.ts <= 100002 and join_tb0.c7 = true;
|
sql_error select join_tb3.* from $tb1 , $tb2 where join_tb1.ts = join_tb0.ts and join_tb1.ts <= 100002 and join_tb0.c7 = true;
|
||||||
sql_error select join_tb1.* from $tb1 , $tb2 where join_tb1.ts = join_tb0.ts and join_tb1.ts = join_tb0.c1;
|
sql select join_tb1.* from $tb1 , $tb2 where join_tb1.ts = join_tb0.ts and join_tb1.ts = join_tb0.c1;
|
||||||
sql_error select join_tb1.* from $tb1 , $tb2 where join_tb1.ts = join_tb0.c1;
|
sql_error select join_tb1.* from $tb1 , $tb2 where join_tb1.ts = join_tb0.c1;
|
||||||
sql_error select join_tb1.* from $tb1 , $tb2 where join_tb1.c7 = join_tb0.c1;
|
sql_error select join_tb1.* from $tb1 , $tb2 where join_tb1.c7 = join_tb0.c1;
|
||||||
sql_error select join_tb1.* from $tb1 , $tb2 where join_tb1.ts > join_tb0.ts;
|
sql_error select join_tb1.* from $tb1 , $tb2 where join_tb1.ts > join_tb0.ts;
|
||||||
|
@ -407,32 +407,32 @@ if $data00 != 396.000000000 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
# first/last
|
# first/last
|
||||||
sql select count(join_mt0.c1), sum(join_mt1.c2), first(join_mt0.c5), last(join_mt1.c7) from join_mt0, join_mt1 where join_mt0.t1=join_mt1.t1 and join_mt0.ts=join_mt1.ts and join_mt0.t1=1 interval(10a) order by join_mt0.ts asc;
|
sql select count(join_mt0.c1), sum(join_mt1.c2), first(join_mt0.c5), last(join_mt1.c7) from join_mt0, join_mt1 where join_mt0.t1=join_mt1.t1 and join_mt0.ts=join_mt1.ts and join_mt0.t1=1 interval(10a) order by _wstart asc;
|
||||||
|
|
||||||
$val = 100
|
$val = 100
|
||||||
if $rows != $val then
|
if $rows != $val then
|
||||||
print $rows
|
print $rows
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
print $data00 $data01 $data02
|
||||||
$val = 10
|
$val = 10
|
||||||
if $data01 != $val then
|
if $data00 != $val then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
$val = 45.000000000
|
$val = 45.000000000
|
||||||
print $data02
|
print $data01
|
||||||
if $data02 != $val then
|
if $data01 != $val then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
$val = 0
|
$val = 0
|
||||||
if $data03 != 0 then
|
if $data02 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
# order by first/last
|
# order by first/last
|
||||||
sql select count(join_mt0.c1), sum(join_mt1.c2), first(join_mt0.c5), last(join_mt1.c7) from join_mt0, join_mt1 where join_mt0.t1=join_mt1.t1 and join_mt0.ts=join_mt1.ts and join_mt0.t1=1 interval(10a) order by join_mt0.ts desc;
|
sql select count(join_mt0.c1), sum(join_mt1.c2), first(join_mt0.c5), last(join_mt1.c7) from join_mt0, join_mt1 where join_mt0.t1=join_mt1.t1 and join_mt0.ts=join_mt1.ts and join_mt0.t1=1 interval(10a) order by _wstart desc;
|
||||||
|
|
||||||
$val = 100
|
$val = 100
|
||||||
if $rows != $val then
|
if $rows != $val then
|
||||||
|
@ -453,13 +453,13 @@ print =================>"group by not supported"
|
||||||
|
|
||||||
#======================limit offset===================================
|
#======================limit offset===================================
|
||||||
# tag values not int
|
# tag values not int
|
||||||
sql_error select count(*) from join_mt0, join_mt1 where join_mt0.ts=join_mt1.ts and join_mt0.t2=join_mt1.t2;
|
sql select count(*) from join_mt0, join_mt1 where join_mt0.ts=join_mt1.ts and join_mt0.t2=join_mt1.t2;
|
||||||
|
|
||||||
# tag type not identical
|
# tag type not identical
|
||||||
sql_error select count(*) from join_mt0, join_mt1 where join_mt1.t2 = join_mt0.t1 and join_mt1.ts=join_mt0.ts;
|
sql select count(*) from join_mt0, join_mt1 where join_mt1.t2 = join_mt0.t1 and join_mt1.ts=join_mt0.ts;
|
||||||
|
|
||||||
# table/super table join
|
# table/super table join
|
||||||
sql_error select count(join_mt0.c1) from join_mt0, join_tb1 where join_mt0.ts=join_tb1.ts
|
sql select count(join_mt0.c1) from join_mt0, join_tb1 where join_mt0.ts=join_tb1.ts
|
||||||
|
|
||||||
# multi-condition
|
# multi-condition
|
||||||
|
|
||||||
|
@ -471,7 +471,7 @@ sql_error select count(join_mt0.c1), count(join_mt0.c2) from join_mt0, join_mt0
|
||||||
sql_error select sum(join_mt1.c2) from join_mt0, join_mt1 where join_mt0.t1=join_mt1.t1;
|
sql_error select sum(join_mt1.c2) from join_mt0, join_mt1 where join_mt0.t1=join_mt1.t1;
|
||||||
|
|
||||||
# missing tag equals
|
# missing tag equals
|
||||||
sql_error select count(join_mt1.c3) from join_mt0, join_mt1 where join_mt0.ts=join_mt1.ts;
|
sql select count(join_mt1.c3) from join_mt0, join_mt1 where join_mt0.ts=join_mt1.ts;
|
||||||
|
|
||||||
# tag values are identical error
|
# tag values are identical error
|
||||||
sql create table m1(ts timestamp, k int) tags(a int);
|
sql create table m1(ts timestamp, k int) tags(a int);
|
||||||
|
@ -486,7 +486,7 @@ sql insert into tm2 using m1 tags(1) values(1000000, 1)(2000000, 2);
|
||||||
sql insert into um1 using m2 tags(1) values(1000001, 10)(2000000, 20);
|
sql insert into um1 using m2 tags(1) values(1000001, 10)(2000000, 20);
|
||||||
sql insert into um2 using m2 tags(9) values(1000001, 10)(2000000, 20);
|
sql insert into um2 using m2 tags(9) values(1000001, 10)(2000000, 20);
|
||||||
|
|
||||||
sql_error select count(*) from m1,m2 where m1.a=m2.a and m1.ts=m2.ts;
|
sql select count(*) from m1,m2 where m1.a=m2.a and m1.ts=m2.ts;
|
||||||
|
|
||||||
print ====> empty table/empty super-table join test, add for no result join test
|
print ====> empty table/empty super-table join test, add for no result join test
|
||||||
sql create database ux1;
|
sql create database ux1;
|
||||||
|
|
Loading…
Reference in New Issue