fix scanoperator using sma info of last group

This commit is contained in:
wangjiaming0909 2024-04-29 16:17:04 +08:00
parent 0b4f5150b6
commit 94fc209d7d
2 changed files with 13 additions and 1 deletions

View File

@ -711,6 +711,7 @@ static void initNextGroupScan(STableScanInfo* pInfo, STableKeyInfo** pKeyInfo, i
pInfo->tableStartIndex = TARRAY_ELEM_IDX(pInfo->base.pTableListInfo->pTableList, *pKeyInfo);
pInfo->tableEndIndex = (pInfo->tableStartIndex + (*size) - 1);
pInfo->pResBlock->info.blankFill = false;
taosMemoryFreeClear(pInfo->pResBlock->pBlockAgg);
if (!pInfo->needCountEmptyTable) {
pInfo->countState = TABLE_COUNT_STATE_END;

View File

@ -257,7 +257,18 @@ class TDTestCase:
os.system(f'taos -f {sql_file}')
tdSql.query('select count(c_1) from d2.t2 where c_1 < 10', queryTimes=1)
tdSql.checkData(0, 0, 0)
tdSql.execute('drop database d2')
tdSql.query('select count(c_1), min(c_1),tbname from d2.can partition by tbname', queryTimes=1)
tdSql.checkData(0, 0, 0)
tdSql.checkData(0, 1, None)
tdSql.checkData(0, 2, 't3')
tdSql.checkData(1, 0, 15)
tdSql.checkData(1, 1, 1471617148940980000)
tdSql.checkData(1, 2, 't2')
tdSql.checkData(2, 0, 0)
tdSql.checkData(2, 1, None)
tdSql.checkData(2, 2, 't1')
def run(self):
self.test_count_with_sma_data()