Merge pull request #24474 from taosdata/FIX/TD-28018
Fix: last row num error where partition by null column
This commit is contained in:
commit
22b8dbe7d5
|
@ -391,7 +391,10 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32
|
||||||
if (!COL_VAL_IS_VALUE(&p->colVal)) {
|
if (!COL_VAL_IS_VALUE(&p->colVal)) {
|
||||||
hasNotNullRow = false;
|
hasNotNullRow = false;
|
||||||
}
|
}
|
||||||
continue;
|
// For all of cols is null, the last null col of last table will be save
|
||||||
|
if (i != pr->numOfTables - 1 || k != pr->numOfCols - 1 || hasRes) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hasRes = true;
|
hasRes = true;
|
||||||
|
|
|
@ -387,7 +387,7 @@ class TDTestCase:
|
||||||
tdSql.query('select last(c1) from meters partition by t1')
|
tdSql.query('select last(c1) from meters partition by t1')
|
||||||
print(str(tdSql.queryResult))
|
print(str(tdSql.queryResult))
|
||||||
tdSql.checkCols(1)
|
tdSql.checkCols(1)
|
||||||
tdSql.checkRows(2)
|
tdSql.checkRows(5)
|
||||||
p = subprocess.run(["taos", '-s', "alter table test.meters drop column c1; alter table test.meters add column c2 int"])
|
p = subprocess.run(["taos", '-s', "alter table test.meters drop column c1; alter table test.meters add column c2 int"])
|
||||||
p.check_returncode()
|
p.check_returncode()
|
||||||
tdSql.query_success_failed('select last(c1) from meters partition by t1', queryTimes=10, expectErrInfo="Invalid column name: c1")
|
tdSql.query_success_failed('select last(c1) from meters partition by t1', queryTimes=10, expectErrInfo="Invalid column name: c1")
|
||||||
|
|
Loading…
Reference in New Issue