提交 86e6e9ec 编写于 作者: L liuyq-617

modify test case for unsigned datetype

上级 0b4f0680
......@@ -58,6 +58,18 @@ class TDTestCase:
tdSql.query("select min(col4) from test1")
tdSql.checkData(0, 0, np.min(intData))
tdSql.query("select min(col11) from test1")
tdSql.checkData(0, 0, np.min(intData))
tdSql.query("select min(col12) from test1")
tdSql.checkData(0, 0, np.min(intData))
tdSql.query("select min(col13) from test1")
tdSql.checkData(0, 0, np.min(intData))
tdSql.query("select min(col14) from test1")
tdSql.checkData(0, 0, np.min(intData))
tdSql.query("select min(col5) from test1")
tdSql.checkData(0, 0, np.min(floatData))
......
......@@ -44,9 +44,9 @@ class TDTestCase:
tdSql.checkRows(11)
tdSql.checkData(0, 0, 2.0)
tdSql.query("select col1 + col2 * col3 + col3 / col4 + col5 + col6 from test1")
tdSql.checkRows(11)
tdSql.checkData(0, 0, 3.2)
tdSql.query("select col1 + col2 * col3 + col3 / col4 + col5 + col6 + col11 + col12 + col13 + col14 from test1")
tdSql.checkRows(10)
tdSql.checkData(0, 0, 7.2)
#tdSql.execute("insert into test1(ts, col1) values(%d, 11)" % (self.ts + 11))
tdSql.query("select col1 + col2 from test1")
......@@ -57,7 +57,7 @@ class TDTestCase:
tdSql.checkRows(11)
tdSql.checkData(10, 0, None)
tdSql.query("select col1 + col2 * col3 + col3 / col4 + col5 + col6 from test1")
tdSql.query("select col1 + col2 * col3 + col3 / col4 + col5 + col6 + col11 + col12 + col13 + col14 from test1")
tdSql.checkRows(11)
tdSql.checkData(10, 0, None)
......
......@@ -99,6 +99,58 @@ class TDTestCase:
tdSql.query("select apercentile(col4, 100) from test")
print("apercentile result: %s" % tdSql.getData(0, 0))
tdSql.query("select percentile(col11, 0) from test")
tdSql.checkData(0, 0, np.percentile(intData, 0))
tdSql.query("select apercentile(col11, 0) from test")
print("apercentile result: %s" % tdSql.getData(0, 0))
tdSql.query("select percentile(col11, 50) from test")
tdSql.checkData(0, 0, np.percentile(intData, 50))
tdSql.query("select apercentile(col11, 50) from test")
print("apercentile result: %s" % tdSql.getData(0, 0))
tdSql.query("select percentile(col11, 100) from test")
tdSql.checkData(0, 0, np.percentile(intData, 100))
tdSql.query("select apercentile(col11, 100) from test")
print("apercentile result: %s" % tdSql.getData(0, 0))
tdSql.query("select percentile(col12, 0) from test")
tdSql.checkData(0, 0, np.percentile(intData, 0))
tdSql.query("select apercentile(col12, 0) from test")
print("apercentile result: %s" % tdSql.getData(0, 0))
tdSql.query("select percentile(col12, 50) from test")
tdSql.checkData(0, 0, np.percentile(intData, 50))
tdSql.query("select apercentile(col12, 50) from test")
print("apercentile result: %s" % tdSql.getData(0, 0))
tdSql.query("select percentile(col12, 100) from test")
tdSql.checkData(0, 0, np.percentile(intData, 100))
tdSql.query("select apercentile(col12, 100) from test")
print("apercentile result: %s" % tdSql.getData(0, 0))
tdSql.query("select percentile(col13, 0) from test")
tdSql.checkData(0, 0, np.percentile(intData, 0))
tdSql.query("select apercentile(col13, 0) from test")
print("apercentile result: %s" % tdSql.getData(0, 0))
tdSql.query("select percentile(col13, 50) from test")
tdSql.checkData(0, 0, np.percentile(intData, 50))
tdSql.query("select apercentile(col13, 50) from test")
print("apercentile result: %s" % tdSql.getData(0, 0))
tdSql.query("select percentile(col13, 100) from test")
tdSql.checkData(0, 0, np.percentile(intData, 100))
tdSql.query("select apercentile(col13, 100) from test")
print("apercentile result: %s" % tdSql.getData(0, 0))
tdSql.query("select percentile(col14, 0) from test")
tdSql.checkData(0, 0, np.percentile(intData, 0))
tdSql.query("select apercentile(col14, 0) from test")
print("apercentile result: %s" % tdSql.getData(0, 0))
tdSql.query("select percentile(col14, 50) from test")
tdSql.checkData(0, 0, np.percentile(intData, 50))
tdSql.query("select apercentile(col14, 50) from test")
print("apercentile result: %s" % tdSql.getData(0, 0))
tdSql.query("select percentile(col14, 100) from test")
tdSql.checkData(0, 0, np.percentile(intData, 100))
tdSql.query("select apercentile(col14, 100) from test")
print("apercentile result: %s" % tdSql.getData(0, 0))
tdSql.query("select percentile(col5, 0) from test")
print("query result: %s" % tdSql.getData(0, 0))
print("array result: %s" % np.percentile(floatData, 0))
......
......@@ -36,8 +36,16 @@ class TDTestCase:
tdSql.error("select spread(col8) from test1")
tdSql.error("select spread(col9) from test")
tdSql.error("select spread(col9) from test1")
tdSql.error("select spread(col11) from test")
tdSql.error("select spread(col11) from test1")
tdSql.error("select spread(col12) from test")
tdSql.error("select spread(col12) from test1")
tdSql.error("select spread(col13) from test")
tdSql.error("select spread(col13) from test1")
tdSql.error("select spread(col14) from test")
tdSql.error("select spread(col14) from test1")
tdSql.query("select spread(col1) from test1")
tdSql.checkRows(1)
tdSql.checkData(0, 0, 10)
......
......@@ -55,6 +55,18 @@ class TDTestCase:
tdSql.query("select stddev(col4) from test1")
tdSql.checkData(0, 0, np.std(intData))
tdSql.query("select stddev(col11) from test1")
tdSql.checkData(0, 0, np.std(intData))
tdSql.query("select stddev(col12) from test1")
tdSql.checkData(0, 0, np.std(intData))
tdSql.query("select stddev(col13) from test1")
tdSql.checkData(0, 0, np.std(intData))
tdSql.query("select stddev(col14) from test1")
tdSql.checkData(0, 0, np.std(intData))
tdSql.query("select stddev(col5) from test1")
tdSql.checkData(0, 0, np.std(floatData))
......
......@@ -51,6 +51,13 @@ class TDTestCase:
tdSql.checkData(0, 0, np.sum(intData))
tdSql.query("select sum(col4) from test")
tdSql.checkData(0, 0, np.sum(intData))
tdSql.query("select sum(col11) from test")
tdSql.checkData(0, 0, np.sum(intData))
tdSql.query("select sum(col12) from test")
tdSql.checkData(0, 0, np.sum(intData))
tdSql.query("select sum(col13) from test")
tdSql.checkData(0, 0, np.sum(intData))
tdSql.query("select sum(col14) from test")
tdSql.query("select sum(col5) from test")
tdSql.checkData(0, 0, np.sum(floatData))
tdSql.query("select sum(col6) from test")
......
......@@ -75,6 +75,26 @@ class TDTestCase:
tdSql.checkData(0, 1, 9)
tdSql.checkData(1, 1, 10)
tdSql.query("select top(col11, 2) from test")
tdSql.checkRows(2)
tdSql.checkData(0, 1, 9)
tdSql.checkData(1, 1, 10)
tdSql.query("select top(col12, 2) from test")
tdSql.checkRows(2)
tdSql.checkData(0, 1, 9)
tdSql.checkData(1, 1, 10)
tdSql.query("select top(col13, 2) from test")
tdSql.checkRows(2)
tdSql.checkData(0, 1, 9)
tdSql.checkData(1, 1, 10)
tdSql.query("select top(col14, 2) from test")
tdSql.checkRows(2)
tdSql.checkData(0, 1, 9)
tdSql.checkData(1, 1, 10)
tdSql.query("select top(col5, 2) from test")
tdSql.checkRows(2)
tdSql.checkData(0, 1, 8.1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册