add test case
This commit is contained in:
parent
2be0ca15d8
commit
b589f9089c
|
@ -3043,7 +3043,6 @@ static int32_t setBlockIntoRes(SStreamScanInfo* pInfo, const SSDataBlock* pBlock
|
|||
}
|
||||
|
||||
if (code) {
|
||||
blockDataFreeRes((SSDataBlock*)pBlock);
|
||||
QUERY_CHECK_CODE(code, lino, _end);
|
||||
}
|
||||
|
||||
|
|
|
@ -5531,6 +5531,7 @@ static int32_t translateGroupByList(STranslateContext* pCxt, SSelectStmt* pSelec
|
|||
SReplaceGroupByAliasCxt cxt = {
|
||||
.pTranslateCxt = pCxt, .pProjectionList = pSelect->pProjectionList};
|
||||
nodesRewriteExprsPostOrder(pSelect->pGroupByList, translateGroupPartitionByImpl, &cxt);
|
||||
|
||||
return pCxt->errCode;
|
||||
}
|
||||
|
||||
|
@ -5542,6 +5543,7 @@ static int32_t translatePartitionByList(STranslateContext* pCxt, SSelectStmt* pS
|
|||
SReplaceGroupByAliasCxt cxt = {
|
||||
.pTranslateCxt = pCxt, .pProjectionList = pSelect->pProjectionList};
|
||||
nodesRewriteExprsPostOrder(pSelect->pPartitionByList, translateGroupPartitionByImpl, &cxt);
|
||||
|
||||
return pCxt->errCode;
|
||||
}
|
||||
|
||||
|
|
|
@ -439,13 +439,16 @@ class TDTestCase:
|
|||
tdSql.checkRows(10)
|
||||
|
||||
def test_TD_32883(self):
|
||||
sql = "select avg(c1), t9 from stb group by t9,t9, tbname"
|
||||
sql = "select avg(c1), t9 from db.stb group by t9,t9, tbname"
|
||||
tdSql.query(sql, queryTimes=1)
|
||||
tdSql.checkRows(5)
|
||||
sql = "select avg(c1), t10 from stb group by t10,t10, tbname"
|
||||
sql = "select avg(c1), t10 from db.stb group by t10,t10, tbname"
|
||||
tdSql.query(sql, queryTimes=1)
|
||||
tdSql.checkRows(5)
|
||||
sql = "select avg(c1), t10 from stb partition by t10,t10, tbname"
|
||||
sql = "select avg(c1), t10 from db.stb partition by t10,t10, tbname"
|
||||
tdSql.query(sql, queryTimes=1)
|
||||
tdSql.checkRows(5)
|
||||
sql = "select avg(c1), concat(t9,t10) from db.stb group by concat(t9,t10), concat(t9,t10),tbname"
|
||||
tdSql.query(sql, queryTimes=1)
|
||||
tdSql.checkRows(5)
|
||||
|
||||
|
|
Loading…
Reference in New Issue