fix: rename compareAsStrInGreatest in test case
This commit is contained in:
parent
1d707a4318
commit
3bcbc12001
|
@ -1,5 +1,5 @@
|
|||
|
||||
taos> alter local 'transToStrWhenMixTypeInLeast' '1';
|
||||
taos> alter local 'compareAsStrInGreatest' '1';
|
||||
|
||||
taos> select GREATEST(1,2,3,4,5,6,7,8,9,10);
|
||||
greatest(1,2,3,4,5,6,7,8,9,10) |
|
||||
|
@ -713,7 +713,7 @@ taos> select GREATEST(current, voltage, '15') from ts_4893.n1;
|
|||
NULL |
|
||||
5.000000 |
|
||||
|
||||
taos> alter local 'transToStrWhenMixTypeInLeast' '0';
|
||||
taos> alter local 'compareAsStrInGreatest' '0';
|
||||
|
||||
taos> select GREATEST(1,'2',3.3,4.4,5);
|
||||
greatest(1,'2',3.3,4.4,5) |
|
||||
|
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
taos> alter local 'transToStrWhenMixTypeInLeast' '1';
|
||||
taos> alter local 'compareAsStrInGreatest' '1';
|
||||
|
||||
taos> select LEAST(1,2,3,4,5,6,7,8,9,10);
|
||||
least(1,2,3,4,5,6,7,8,9,10) |
|
||||
|
@ -693,7 +693,7 @@ taos> select LEAST(current, voltage, '15') from ts_4893.n1;
|
|||
NULL |
|
||||
15 |
|
||||
|
||||
taos> alter local 'transToStrWhenMixTypeInLeast' '0';
|
||||
taos> alter local 'compareAsStrInGreatest' '0';
|
||||
|
||||
taos> select LEAST(1,2,3,4,5,6,7,8,9,10);
|
||||
least(1,2,3,4,5,6,7,8,9,10) |
|
||||
|
|
|
|
@ -1,4 +1,4 @@
|
|||
alter local 'transToStrWhenMixTypeInLeast' '1';
|
||||
alter local 'compareAsStrInGreatest' '1';
|
||||
select GREATEST(1,2,3,4,5,6,7,8,9,10);
|
||||
select GREATEST(1,1.1,2.23,3.4444,5.66666666,6.21241241,7.999999999999);
|
||||
select GREATEST(1,'2',3.3,4.4,5);
|
||||
|
@ -116,7 +116,7 @@ select GREATEST('23', 3443434343434343) from ts_4893.n1;
|
|||
select GREATEST('23', 1443434343434343) from ts_4893.n1;
|
||||
select GREATEST(current, voltage) from ts_4893.n1;
|
||||
select GREATEST(current, voltage, '15') from ts_4893.n1;
|
||||
alter local 'transToStrWhenMixTypeInLeast' '0';
|
||||
alter local 'compareAsStrInGreatest' '0';
|
||||
select GREATEST(1,'2',3.3,4.4,5);
|
||||
select GREATEST(1,2,3,4,5,'5.1');
|
||||
select GREATEST(121,'18');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
alter local 'transToStrWhenMixTypeInLeast' '1';
|
||||
alter local 'compareAsStrInGreatest' '1';
|
||||
select LEAST(1,2,3,4,5,6,7,8,9,10);
|
||||
select LEAST(1,1.1,2.23,3.4444,5.66666666,6.21241241,7.999999999999);
|
||||
select LEAST(1,'2',3.3,4.4,5);
|
||||
|
@ -112,7 +112,7 @@ select LEAST('23', 3443434343434343) from ts_4893.n1;
|
|||
select LEAST('23', 1443434343434343) from ts_4893.n1;
|
||||
select LEAST(current, voltage) from ts_4893.n1;
|
||||
select LEAST(current, voltage, '15') from ts_4893.n1;
|
||||
alter local 'transToStrWhenMixTypeInLeast' '0';
|
||||
alter local 'compareAsStrInGreatest' '0';
|
||||
select LEAST(1,2,3,4,5,6,7,8,9,10);
|
||||
select LEAST(1,1.1,2.23,3.4444,5.66666666,6.21241241,7.999999999999);
|
||||
select LEAST(1,'2',3.3,4.4,5);
|
||||
|
|
|
@ -286,7 +286,7 @@ class TDTestCase(TBase):
|
|||
def test_greatest(self):
|
||||
self.test_normal_query_new("greatest")
|
||||
|
||||
tdSql.execute("alter local 'transToStrWhenMixTypeInLeast' '1';")
|
||||
tdSql.execute("alter local 'compareAsStrInGreatest' '1';")
|
||||
|
||||
tdSql.query("select GREATEST(NULL, NULL, NULL, NULL);")
|
||||
tdSql.checkRows(1)
|
||||
|
@ -358,7 +358,7 @@ class TDTestCase(TBase):
|
|||
def test_least(self):
|
||||
self.test_normal_query_new("least")
|
||||
|
||||
tdSql.execute("alter local 'transToStrWhenMixTypeInLeast' '1';")
|
||||
tdSql.execute("alter local 'compareAsStrInGreatest' '1';")
|
||||
|
||||
tdSql.query("select LEAST(NULL, NULL, NULL, NULL);")
|
||||
tdSql.checkRows(1)
|
||||
|
|
|
@ -0,0 +1,260 @@
|
|||
|
||||
taos> select EXP(0)
|
||||
exp(0) |
|
||||
============================
|
||||
1 |
|
||||
|
||||
taos> select EXP(1)
|
||||
exp(1) |
|
||||
============================
|
||||
2.71828182845905 |
|
||||
|
||||
taos> select EXP(1.5)
|
||||
exp(1.5) |
|
||||
============================
|
||||
4.48168907033806 |
|
||||
|
||||
taos> select EXP(100)
|
||||
exp(100) |
|
||||
============================
|
||||
2.68811714181614e+43 |
|
||||
|
||||
taos> select EXP(-1)
|
||||
exp(-1) |
|
||||
============================
|
||||
0.367879441171442 |
|
||||
|
||||
taos> select EXP(-1.5)
|
||||
exp(-1.5) |
|
||||
============================
|
||||
0.22313016014843 |
|
||||
|
||||
taos> select EXP(-100)
|
||||
exp(-100) |
|
||||
============================
|
||||
3.72007597602084e-44 |
|
||||
|
||||
taos> select EXP(1) + 1
|
||||
exp(1) + 1 |
|
||||
============================
|
||||
3.71828182845905 |
|
||||
|
||||
taos> select EXP(1) - 1
|
||||
exp(1) - 1 |
|
||||
============================
|
||||
1.71828182845905 |
|
||||
|
||||
taos> select EXP(1) * 1
|
||||
exp(1) * 1 |
|
||||
============================
|
||||
2.71828182845905 |
|
||||
|
||||
taos> select EXP(1) / 1
|
||||
exp(1) / 1 |
|
||||
============================
|
||||
2.71828182845905 |
|
||||
|
||||
taos> select exp(1) from ts_4893.meters limit 5
|
||||
exp(1) |
|
||||
============================
|
||||
2.71828182845905 |
|
||||
2.71828182845905 |
|
||||
2.71828182845905 |
|
||||
2.71828182845905 |
|
||||
2.71828182845905 |
|
||||
|
||||
taos> select exp(1) + 1 from ts_4893.meters limit 1
|
||||
exp(1) + 1 |
|
||||
============================
|
||||
3.71828182845905 |
|
||||
|
||||
taos> select exp(1) - 1 from ts_4893.meters limit 1
|
||||
exp(1) - 1 |
|
||||
============================
|
||||
1.71828182845905 |
|
||||
|
||||
taos> select exp(1) * 2 from ts_4893.meters limit 1
|
||||
exp(1) * 2 |
|
||||
============================
|
||||
5.43656365691809 |
|
||||
|
||||
taos> select exp(1) / 2 from ts_4893.meters limit 1
|
||||
exp(1) / 2 |
|
||||
============================
|
||||
1.35914091422952 |
|
||||
|
||||
taos> select exp(2) + exp(1) from ts_4893.meters limit 1
|
||||
exp(2) + exp(1) |
|
||||
============================
|
||||
10.1073379273897 |
|
||||
|
||||
taos> select exp(2) - exp(1) from ts_4893.meters limit 1
|
||||
exp(2) - exp(1) |
|
||||
============================
|
||||
4.67077427047161 |
|
||||
|
||||
taos> select exp(2) * exp(1) from ts_4893.meters limit 1
|
||||
exp(2) * exp(1) |
|
||||
============================
|
||||
20.0855369231877 |
|
||||
|
||||
taos> select exp(2) / exp(1) from ts_4893.meters limit 1
|
||||
exp(2) / exp(1) |
|
||||
============================
|
||||
2.71828182845905 |
|
||||
|
||||
taos> select exp(1) + id from ts_4893.meters order by ts limit 5
|
||||
exp(1) + id |
|
||||
============================
|
||||
2.71828182845905 |
|
||||
3.71828182845905 |
|
||||
4.71828182845904 |
|
||||
5.71828182845904 |
|
||||
6.71828182845904 |
|
||||
|
||||
taos> select exp(id) + id from ts_4893.meters order by ts limit 5
|
||||
exp(id) + id |
|
||||
============================
|
||||
1 |
|
||||
3.71828182845905 |
|
||||
9.38905609893065 |
|
||||
23.0855369231877 |
|
||||
58.5981500331442 |
|
||||
|
||||
taos> select abs(EXP(10))
|
||||
abs(exp(10)) |
|
||||
============================
|
||||
22026.4657948067 |
|
||||
|
||||
taos> select pow(EXP(10), 2)
|
||||
pow(exp(10), 2) |
|
||||
============================
|
||||
485165195.40979 |
|
||||
|
||||
taos> select sqrt(EXP(10))
|
||||
sqrt(exp(10)) |
|
||||
============================
|
||||
148.413159102577 |
|
||||
|
||||
taos> select cast(EXP(10) as int)
|
||||
cast(exp(10) as int) |
|
||||
=======================
|
||||
22026 |
|
||||
|
||||
taos> select EXP(sqrt(id)) from ts_4893.meters order by ts limit 5
|
||||
exp(sqrt(id)) |
|
||||
============================
|
||||
1 |
|
||||
2.71828182845905 |
|
||||
4.11325037878293 |
|
||||
5.65223367403409 |
|
||||
7.38905609893065 |
|
||||
|
||||
taos> select EXP(EXP(EXP(EXP(0))))
|
||||
exp(exp(exp(exp(0)))) |
|
||||
============================
|
||||
3814279.10476021 |
|
||||
|
||||
taos> select exp(2)
|
||||
exp(2) |
|
||||
============================
|
||||
7.38905609893065 |
|
||||
|
||||
taos> select exp(0.5)
|
||||
exp(0.5) |
|
||||
============================
|
||||
1.64872127070013 |
|
||||
|
||||
taos> select exp(current) from ts_4893.d0 order by ts limit 10
|
||||
exp(current) |
|
||||
============================
|
||||
42192.5784536358 |
|
||||
5292.25843238073 |
|
||||
17943.8026187706 |
|
||||
75583.9925987174 |
|
||||
44622.8049048128 |
|
||||
4954.24653595498 |
|
||||
14705.8362489581 |
|
||||
57641.6048971866 |
|
||||
75056.7544355615 |
|
||||
30853.3277793953 |
|
||||
|
||||
taos> select exp(current) from ts_4893.meters order by ts limit 10
|
||||
exp(current) |
|
||||
============================
|
||||
42192.5784536358 |
|
||||
5292.25843238073 |
|
||||
17943.8026187706 |
|
||||
75583.9925987174 |
|
||||
44622.8049048128 |
|
||||
4954.24653595498 |
|
||||
14705.8362489581 |
|
||||
57641.6048971866 |
|
||||
75056.7544355615 |
|
||||
30853.3277793953 |
|
||||
|
||||
taos> select exp(null)
|
||||
exp(null) |
|
||||
============================
|
||||
NULL |
|
||||
|
||||
taos> select exp(100000)
|
||||
exp(100000) |
|
||||
============================
|
||||
NULL |
|
||||
|
||||
taos> select exp(-1000)
|
||||
exp(-1000) |
|
||||
============================
|
||||
0 |
|
||||
|
||||
taos> select exp(-9999999999)
|
||||
exp(-9999999999) |
|
||||
============================
|
||||
0 |
|
||||
|
||||
taos> select exp(0.0001)
|
||||
exp(0.0001) |
|
||||
============================
|
||||
1.00010000500017 |
|
||||
|
||||
taos> select exp(pi())
|
||||
exp(pi()) |
|
||||
============================
|
||||
23.1406926327793 |
|
||||
|
||||
taos> select exp(voltage) from ts_4893.meters limit 1
|
||||
exp(voltage) |
|
||||
============================
|
||||
9.5297279023672e+95 |
|
||||
|
||||
taos> select exp(current) from ts_4893.meters limit 1
|
||||
exp(current) |
|
||||
============================
|
||||
42192.5784536358 |
|
||||
|
||||
taos> select exp(phase) from ts_4893.meters limit 1
|
||||
exp(phase) |
|
||||
============================
|
||||
1.66345708776676 |
|
||||
|
||||
taos> select exp(voltage + current) from ts_4893.meters limit 1
|
||||
exp(voltage + current) |
|
||||
============================
|
||||
4.02083792162431e+100 |
|
||||
|
||||
taos> select exp(abs(current)) from ts_4893.meters limit 1
|
||||
exp(abs(current)) |
|
||||
============================
|
||||
42192.5784536358 |
|
||||
|
||||
taos> select exp(log(voltage)) from ts_4893.meters limit 1
|
||||
exp(log(voltage)) |
|
||||
============================
|
||||
221 |
|
||||
|
||||
taos> select round(exp(voltage), 2) from ts_4893.meters limit 1
|
||||
round(exp(voltage), 2) |
|
||||
============================
|
||||
9.5297279023672e+95 |
|
||||
|
Loading…
Reference in New Issue