diff --git a/tests/system-test/2-query/To_unixtimestamp.py b/tests/system-test/2-query/To_unixtimestamp.py new file mode 100644 index 0000000000000000000000000000000000000000..7088142f9a075deeabd6ec1989962fbef3f771b7 --- /dev/null +++ b/tests/system-test/2-query/To_unixtimestamp.py @@ -0,0 +1,52 @@ +from time import sleep + +from util.log import * +from util.sql import * +from util.cases import * + + + + +class TDTestCase: + + def init(self, conn, logSql): + tdLog.debug(f"start to excute {__file__}") + tdSql.init(conn.cursor()) + + def run(self): # sourcery skip: extract-duplicate-method + tdSql.prepare() + tdLog.printNoPrefix("==========step1:create tables==========") + tdSql.execute( + '''create table if not exists ntb + (ts timestamp, c1 int, c2 float,c3 double,c4 timestamp) + ''' + ) + tdSql.execute( + '''create table if not exists stb + (ts timestamp, c1 int, c2 float,c3 double,c4 timestamp) tags(t0 int) + ''' + ) + tdSql.execute( + '''create table if not exists stb_1 using stb tags(100) + ''' + ) + tdLog.printNoPrefix("==========step2:insert data into ntb==========") + + + + + + + + + + + + + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) \ No newline at end of file