diff --git a/tests/pytest/functions/function_arithmetic.py b/tests/pytest/functions/function_arithmetic.py index a2249bab8848927e707b1f3c9378a00a7c91546e..a74ed1a8f7a4151454a8b799844676347badac7c 100644 --- a/tests/pytest/functions/function_arithmetic.py +++ b/tests/pytest/functions/function_arithmetic.py @@ -61,7 +61,24 @@ class TDTestCase: tdSql.checkData(1, 0, 1210) tdSql.error("select avg(col1 * 2)from test group by loc") - + + # add testcases for TD-10515---> test arithmetic function with blank table + tdSql.execute("create table test3 using test tags('heilongjiang')") + sql_list = [ + "select 0.1 + 0.1 from test3", + "select 0.1 - 0.1 from test3", + "select 0.1 * 0.1 from test3", + "select 0.1 / 0.1 from test3", + "select 4 * avg(col1) from test3", + "select 4 * sum(col1) from test3", + "select 4 * avg(col1) * sum(col2) from test3", + "select max(col1) / 4 from test3", + "select min(col1) - 4 from test3", + "select min(col1) + max(col1) * avg(col1) / sum(col1) + 4 from test3" + ] + for sql in sql_list: + tdSql.query(sql) + tdSql.checkRows(0) def stop(self): tdSql.close()