add tail, unique cases
This commit is contained in:
parent
8b84e0544c
commit
6ab16e89d4
|
@ -412,6 +412,18 @@ class TDTestCase:
|
||||||
tdSql.checkData(0,0,4)
|
tdSql.checkData(0,0,4)
|
||||||
tdSql.checkData(1,0,1)
|
tdSql.checkData(1,0,1)
|
||||||
|
|
||||||
|
tdSql.query(f"select tail(a, 1) from (select _rowts, first(c2) as a from ct1 group by c2);")
|
||||||
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
|
tdSql.query(f"select tail(a, 1) from (select _rowts, first(c2) as a from ct1 partition by c2);")
|
||||||
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
|
tdSql.query(f"select tail(a, 1) from (select _rowts, first(c2) as a from ct1 order by c2);")
|
||||||
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
|
tdSql.query(f"select tail(a, 1) from (select _rowts, first(c2) as a from ct1 union select _rowts, first(c2) as a from ct1);")
|
||||||
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
def check_boundary_values(self, dbname="bound_test"):
|
def check_boundary_values(self, dbname="bound_test"):
|
||||||
|
|
||||||
tdSql.execute(f"drop database if exists {dbname}")
|
tdSql.execute(f"drop database if exists {dbname}")
|
||||||
|
|
|
@ -438,6 +438,15 @@ class TDTestCase:
|
||||||
tdSql.checkData(0,0,4)
|
tdSql.checkData(0,0,4)
|
||||||
tdSql.checkData(1,0,1)
|
tdSql.checkData(1,0,1)
|
||||||
|
|
||||||
|
tdSql.query(f"select unique(c1) v from (select _rowts , c1 from {dbname}.ct1 partition by c2)")
|
||||||
|
tdSql.checkRows(10)
|
||||||
|
|
||||||
|
tdSql.query(f"select unique(c1) v from (select _rowts , c1 from {dbname}.ct1 order by c2)")
|
||||||
|
tdSql.checkRows(10)
|
||||||
|
|
||||||
|
tdSql.query(f"select unique(c1) v from (select _rowts , c1 from {dbname}.ct1 union all select _rowts , c1 from {dbname}.ct1)")
|
||||||
|
tdSql.checkRows(10)
|
||||||
|
|
||||||
# TD-19911
|
# TD-19911
|
||||||
tdSql.error("select unique(mode(12)) from (select _rowts , t1 , tbname from db.stb1 );")
|
tdSql.error("select unique(mode(12)) from (select _rowts , t1 , tbname from db.stb1 );")
|
||||||
tdSql.error("select unique(mode(t1,1)) from (select _rowts , t1 , tbname from db.stb1 );")
|
tdSql.error("select unique(mode(t1,1)) from (select _rowts , t1 , tbname from db.stb1 );")
|
||||||
|
|
Loading…
Reference in New Issue