add test cases for TD-30030

This commit is contained in:
Chris Zhai 2024-05-17 15:27:03 +08:00
parent b19298f8e0
commit 29530a4bdc
1 changed files with 16 additions and 0 deletions

View File

@ -118,6 +118,22 @@ class TDTestCase(TBase):
tdSql.query(sql)
tdSql.checkRows(5)
# verification for TD-30030
tdSql.execute("create table t100 (ts timestamp, pk varchar(20) primary key, c1 varchar(100)) tags (id int)")
tdSql.execute("insert into ct1 using t100 tags(1) values('2024-05-17 14:58:52.902', 'a1', '100')")
tdSql.execute("insert into ct1 using t100 tags(1) values('2024-05-17 14:58:52.902', 'a2', '200')")
tdSql.execute("insert into ct1 using t100 tags(1) values('2024-05-17 14:58:52.902', 'a3', '300')")
tdSql.execute("insert into ct2 using t100 tags(2) values('2024-05-17 14:58:52.902', 'a2', '200')")
tdSql.execute("create view v100 as select * from t100")
tdSql.execute("create view v200 as select * from ct1")
tdSql.error("show tags from v100", expectErrInfo="Tags can only applied to super table and child table")
tdSql.error("show tags from v200", expectErrInfo="Tags can only applied to super table and child table")
tdSql.execute("create table t200 (ts timestamp, pk varchar(20) primary key, c1 varchar(100))")
tdSql.error("show tags from t200", expectErrInfo="Tags can only applied to super table and child table")
def checkShow(self):
# not support
sql = "show accounts;"