From 29530a4bdc614c02beb48f644fb2ec9fa6d6b41a Mon Sep 17 00:00:00 2001 From: Chris Zhai Date: Fri, 17 May 2024 15:27:03 +0800 Subject: [PATCH] add test cases for TD-30030 --- tests/army/community/query/show.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/army/community/query/show.py b/tests/army/community/query/show.py index 980e60387a..72b84954cd 100644 --- a/tests/army/community/query/show.py +++ b/tests/army/community/query/show.py @@ -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;"