提交 8ff39302 编写于 作者: G Ganlin Zhao

[TD-13109]<fix>(query): Disable usage of match/nmatch/like/in/is(not) NULL operators in select

上级 1a07afa1
...@@ -297,6 +297,91 @@ class TDTestCase: ...@@ -297,6 +297,91 @@ class TDTestCase:
tdSql.error('select percentile(value, 50) or diff(value) = ceil(value) and apercentile(value, 50) from tb') tdSql.error('select percentile(value, 50) or diff(value) = ceil(value) and apercentile(value, 50) from tb')
tdSql.error('select floor(3.5) or round(3.5) and ceil(3.5) > true and round(3.5) or 3 from tb') tdSql.error('select floor(3.5) or round(3.5) and ceil(3.5) > true and round(3.5) or 3 from tb')
#operator: is NULL
tdSql.error('select count(*) is NULL from tb;')
tdSql.error('select avg(value) is NULL from tb;')
tdSql.error('select twa(value) is NULL from tb;')
tdSql.error('select sum(value) is NULL from tb;')
tdSql.error('select stddev(value) is NULL from tb;')
tdSql.error('select min(value) is NULL from tb;')
tdSql.error('select max(value) is NULL from tb;')
tdSql.error('select first(*) is NULL from tb;')
tdSql.error('select last(*) is NULL from tb;')
tdSql.error('select top(value, 3) is NULL or bottom(value,3) is NULL from tb;')
tdSql.error('select percentile(value, 50) is NULL or apercentile(value, 50) is NULL from tb')
tdSql.error('select diff(value) is NULL or ceil(value) is NULL from tb')
tdSql.error('select floor(3.5) is NULL or round(3.5) is NULL or ceil(3.5) is NULL from tb')
#operator: is not NULL
tdSql.error('select count(*) is not NULL from tb;')
tdSql.error('select avg(value) is not NULL from tb;')
tdSql.error('select twa(value) is not NULL from tb;')
tdSql.error('select sum(value) is not NULL from tb;')
tdSql.error('select stddev(value) is not NULL from tb;')
tdSql.error('select min(value) is not NULL from tb;')
tdSql.error('select max(value) is not NULL from tb;')
tdSql.error('select first(*) is not NULL from tb;')
tdSql.error('select last(*) is not NULL from tb;')
tdSql.error('select top(value, 3) is not NULL or bottom(value,3) is not NULL from tb;')
tdSql.error('select percentile(value, 50) is not NULL or apercentile(value, 50) is not NULL from tb')
tdSql.error('select diff(value) is not NULL or ceil(value) is not NULL from tb')
tdSql.error('select floor(3.5) is not NULL or round(3.5) is not NULL or ceil(3.5) is not NULL from tb')
#operator: like
tdSql.error('select count(*) like "abc" from tb;')
tdSql.error('select avg(value) like "abc" from tb;')
tdSql.error('select twa(value) like "abc" from tb;')
tdSql.error('select sum(value) like "abc" from tb;')
tdSql.error('select stddev(value) like "abc" from tb;')
tdSql.error('select min(value) like "abc" from tb;')
tdSql.error('select max(value) like "abc" from tb;')
tdSql.error('select first(*) like "abc" from tb;')
tdSql.error('select last(*) like "abc" from tb;')
tdSql.error('select top(value, 3) like "abc" or bottom(value,3) like "abc" from tb;')
tdSql.error('select percentile(value, 50) like "abc" or apercentile(value, 50) like "abc" from tb')
tdSql.error('select diff(value) like "abc" or ceil(value) like "abc" from tb')
tdSql.error('select floor(3.5) like "abc" or round(3.5) like "abc" or ceil(3.5) like "abc" from tb')
#operator: match
tdSql.error('select count(*) match "abc" from tb;')
tdSql.error('select avg(value) match "abc" from tb;')
tdSql.error('select twa(value) match "abc" from tb;')
tdSql.error('select sum(value) match "abc" from tb;')
tdSql.error('select stddev(value) match "abc" from tb;')
tdSql.error('select min(value) match "abc" from tb;')
tdSql.error('select max(value) match "abc" from tb;')
tdSql.error('select first(*) match "abc" from tb;')
tdSql.error('select last(*) match "abc" from tb;')
tdSql.error('select top(value, 3) match "abc" or bottom(value,3) match "abc" from tb;')
tdSql.error('select percentile(value, 50) match "abc" or apercentile(value, 50) match "abc" from tb')
tdSql.error('select diff(value) match "abc" or ceil(value) match "abc" from tb')
tdSql.error('select floor(3.5) match "abc" or round(3.5) match "abc" or ceil(3.5) match "abc" from tb')
#operator: nmatch
tdSql.error('select count(*) nmatch "abc" from tb;')
tdSql.error('select avg(value) nmatch "abc" from tb;')
tdSql.error('select twa(value) nmatch "abc" from tb;')
tdSql.error('select sum(value) nmatch "abc" from tb;')
tdSql.error('select stddev(value) nmatch "abc" from tb;')
tdSql.error('select min(value) nmatch "abc" from tb;')
tdSql.error('select max(value) nmatch "abc" from tb;')
tdSql.error('select first(*) nmatch "abc" from tb;')
tdSql.error('select last(*) nmatch "abc" from tb;')
tdSql.error('select top(value, 3) nmatch "abc" or bottom(value,3) nmatch "abc" from tb;')
tdSql.error('select percentile(value, 50) nmatch "abc" or apercentile(value, 50) nmatch "abc" from tb')
tdSql.error('select diff(value) nmatch "abc" or ceil(value) nmatch "abc" from tb')
tdSql.error('select floor(3.5) nmatch "abc" or round(3.5) nmatch "abc" or ceil(3.5) nmatch "abc" from tb')
#operator: in
tdSql.error('select count(*) in 1 from tb;')
tdSql.error('select avg(value) in (1, 2, 3) from tb;')
tdSql.error('select twa(value) in 1.0 from tb;')
tdSql.error('select sum(value) in (1.0, 2.0, 3.0) from tb;')
tdSql.error('select min(value) in (true, false, true) from tb;')
tdSql.error('select tbname in (\'acd\', \'bce\') from tb;')
tdSql.error('select t in ("acd", "bce") from tb;')
tdSql.error('select top(value, 3) in (1,2,3) and ceil(value) in (1.0,2.0,3.0) or last(*) in ("abc","cde") from tb;')
tdSql.execute('drop database db') tdSql.execute('drop database db')
def stop(self): def stop(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册