Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f359ff2c
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f359ff2c
编写于
8月 19, 2021
作者:
Z
zhaoyanggh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-6050]<test> add test case for function ceil/floor/round
上级
01cb58e1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
1989 addition
and
0 deletion
+1989
-0
tests/pytest/functions/function_ceil.py
tests/pytest/functions/function_ceil.py
+663
-0
tests/pytest/functions/function_floor.py
tests/pytest/functions/function_floor.py
+663
-0
tests/pytest/functions/function_round.py
tests/pytest/functions/function_round.py
+663
-0
未找到文件。
tests/pytest/functions/function_ceil.py
0 → 100644
浏览文件 @
f359ff2c
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
sys
import
taos
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
import
numpy
as
np
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
def
run
(
self
):
tdSql
.
prepare
()
tdSql
.
execute
(
"create stable super (ts timestamp, c1 timestamp, c2 int, c3 bigint, c4 float, c5 double, c6 binary(8), c7 smallint, c8 tinyint, c9 bool, c10 nchar(8)) tags (t1 int, t2 bigint, t3 float, t4 double, t5 binary(8), t6 smallint, t7 tinyint, t8 bool, t9 nchar(8))"
)
tdSql
.
execute
(
"create table t1 using super tags (1, 8, 1.0, 1.0, 'abcdefgh', 1, 1, 1, 'abcdeffh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000000, 1537146000000, 1, 1, 1.0, 1.0, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000001, 1537146000000, 1, 1, 1.1, 1.1, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000002, 1537146000000, 1, 1, 1.2, 1.2, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000003, 1537146000000, 1, 1, 1.3, 1.3, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000004, 1537146000000, 1, 1, 1.4, 1.4, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000005, 1537146000000, 1, 1, 1.5, 1.5, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000006, 1537146000000, 1, 1, 1.6, 1.6, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000007, 1537146000000, 1, 1, 1.7, 1.7, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000008, 1537146000000, 1, 1, 1.8, 1.8, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000009, 1537146000000, 1, 1, 1.9, 1.9, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000010, 1537146000000, 1, 1, 1.4444445, 1.444445, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000011, 1537146000000, -1, -1, -1.0, -1.0, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000012, 1537146000000, -1, -1, -1.1, -1.1, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000013, 1537146000000, -1, -1, -1.2, -1.2, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000014, 1537146000000, -1, -1, -1.3, -1.3, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000015, 1537146000000, -1, -1, -1.4, -1.4, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000016, 1537146000000, -1, -1, -1.5, -1.5, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000017, 1537146000000, -1, -1, -1.6, -1.6, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000018, 1537146000000, -1, -1, -1.7, -1.7, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000019, 1537146000000, -1, -1, -1.8, -1.8, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000020, 1537146000000, -1, -1, -1.9, -1.9, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000021, 1537146000000, -1, -1, -1.4444445, -1.444445, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
# tags does not support ceil
# for stable
tdSql
.
error
(
"select ceil(t1) from db.super"
)
tdSql
.
error
(
"select ceil(t2) from db.super"
)
tdSql
.
error
(
"select ceil(t3) from db.super"
)
tdSql
.
error
(
"select ceil(t4) from db.super"
)
tdSql
.
error
(
"select ceil(t5) from db.super"
)
tdSql
.
error
(
"select ceil(t6) from db.super"
)
tdSql
.
error
(
"select ceil(t7) from db.super"
)
tdSql
.
error
(
"select ceil(t8) from db.super"
)
tdSql
.
error
(
"select ceil(t9) from db.super"
)
# for table
tdSql
.
error
(
"select ceil(t1) from db.t1"
)
tdSql
.
error
(
"select ceil(t2) from db.t1"
)
tdSql
.
error
(
"select ceil(t3) from db.t1"
)
tdSql
.
error
(
"select ceil(t4) from db.t1"
)
tdSql
.
error
(
"select ceil(t5) from db.t1"
)
tdSql
.
error
(
"select ceil(t6) from db.t1"
)
tdSql
.
error
(
"select ceil(t7) from db.t1"
)
tdSql
.
error
(
"select ceil(t8) from db.t1"
)
tdSql
.
error
(
"select ceil(t9) from db.t1"
)
# check support columns
# for stable
tdSql
.
error
(
"select ceil(ts) from db.super"
)
tdSql
.
error
(
"select ceil(c1) from db.super"
)
tdSql
.
query
(
"select ceil(c2) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select ceil(c3) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select ceil(c4) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
==
0
:
tdSql
.
checkData
(
0
,
0
,
1
)
if
0
<
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
2
)
if
i
==
11
:
tdSql
.
checkData
(
11
,
0
,
-
1
)
if
i
>
11
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select ceil(c5) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
==
0
:
tdSql
.
checkData
(
0
,
0
,
1
)
if
0
<
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
2
)
if
i
==
11
:
tdSql
.
checkData
(
11
,
0
,
-
1
)
if
i
>
11
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
error
(
"select ceil(c6) from db.super"
)
tdSql
.
query
(
"select ceil(c7) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select ceil(c8) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
error
(
"select ceil(c9) from db.super"
)
tdSql
.
error
(
"select ceil(c10) from db.super"
)
# for table
tdSql
.
error
(
"select ceil(ts) from db.t1"
)
tdSql
.
error
(
"select ceil(c1) from db.t1"
)
tdSql
.
query
(
"select ceil(c2) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select ceil(c3) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select ceil(c4) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
==
0
:
tdSql
.
checkData
(
0
,
0
,
1
)
if
0
<
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
2
)
if
i
==
11
:
tdSql
.
checkData
(
11
,
0
,
-
1
)
if
i
>
11
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select ceil(c5) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
==
0
:
tdSql
.
checkData
(
0
,
0
,
1
)
if
0
<
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
2
)
if
i
==
11
:
tdSql
.
checkData
(
11
,
0
,
-
1
)
if
i
>
11
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
error
(
"select ceil(c6) from db.t1"
)
tdSql
.
query
(
"select ceil(c7) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select ceil(c8) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
error
(
"select ceil(c9) from db.t1"
)
tdSql
.
error
(
"select ceil(c10) from db.t1"
)
# does not support aggregation
# for super table
tdSql
.
error
(
"select max(ceil(c2)) from db.super"
)
tdSql
.
error
(
"select max(ceil(c3)) from db.super"
)
tdSql
.
error
(
"select max(ceil(c4)) from db.super"
)
tdSql
.
error
(
"select max(ceil(c5)) from db.super"
)
tdSql
.
error
(
"select max(ceil(c7)) from db.super"
)
tdSql
.
error
(
"select max(ceil(c8)) from db.super"
)
tdSql
.
error
(
"select ceil(max(c2)) from db.super"
)
tdSql
.
error
(
"select ceil(max(c3)) from db.super"
)
tdSql
.
error
(
"select ceil(max(c4)) from db.super"
)
tdSql
.
error
(
"select ceil(max(c5)) from db.super"
)
tdSql
.
error
(
"select ceil(max(c7)) from db.super"
)
tdSql
.
error
(
"select ceil(max(c8)) from db.super"
)
tdSql
.
error
(
"select min(ceil(c2)) from db.super"
)
tdSql
.
error
(
"select min(ceil(c3)) from db.super"
)
tdSql
.
error
(
"select min(ceil(c4)) from db.super"
)
tdSql
.
error
(
"select min(ceil(c5)) from db.super"
)
tdSql
.
error
(
"select min(ceil(c7)) from db.super"
)
tdSql
.
error
(
"select min(ceil(c8)) from db.super"
)
tdSql
.
error
(
"select ceil(min(c2)) from db.super"
)
tdSql
.
error
(
"select ceil(min(c3)) from db.super"
)
tdSql
.
error
(
"select ceil(min(c4)) from db.super"
)
tdSql
.
error
(
"select ceil(min(c5)) from db.super"
)
tdSql
.
error
(
"select ceil(min(c7)) from db.super"
)
tdSql
.
error
(
"select ceil(min(c8)) from db.super"
)
tdSql
.
error
(
"select avg(ceil(c2)) from db.super"
)
tdSql
.
error
(
"select avg(ceil(c3)) from db.super"
)
tdSql
.
error
(
"select avg(ceil(c4)) from db.super"
)
tdSql
.
error
(
"select avg(ceil(c5)) from db.super"
)
tdSql
.
error
(
"select avg(ceil(c7)) from db.super"
)
tdSql
.
error
(
"select avg(ceil(c8)) from db.super"
)
tdSql
.
error
(
"select ceil(avg(c2)) from db.super"
)
tdSql
.
error
(
"select ceil(avg(c3)) from db.super"
)
tdSql
.
error
(
"select ceil(avg(c4)) from db.super"
)
tdSql
.
error
(
"select ceil(avg(c5)) from db.super"
)
tdSql
.
error
(
"select ceil(avg(c7)) from db.super"
)
tdSql
.
error
(
"select ceil(avg(c8)) from db.super"
)
tdSql
.
error
(
"select last(ceil(c2)) from db.super"
)
tdSql
.
error
(
"select last(ceil(c3)) from db.super"
)
tdSql
.
error
(
"select last(ceil(c4)) from db.super"
)
tdSql
.
error
(
"select last(ceil(c5)) from db.super"
)
tdSql
.
error
(
"select last(ceil(c7)) from db.super"
)
tdSql
.
error
(
"select last(ceil(c8)) from db.super"
)
tdSql
.
error
(
"select ceil(last(c2)) from db.super"
)
tdSql
.
error
(
"select ceil(last(c3)) from db.super"
)
tdSql
.
error
(
"select ceil(last(c4)) from db.super"
)
tdSql
.
error
(
"select ceil(last(c5)) from db.super"
)
tdSql
.
error
(
"select ceil(last(c7)) from db.super"
)
tdSql
.
error
(
"select ceil(last(c8)) from db.super"
)
tdSql
.
error
(
"select last_row(ceil(c2)) from db.super"
)
tdSql
.
error
(
"select last_row(ceil(c3)) from db.super"
)
tdSql
.
error
(
"select last_row(ceil(c4)) from db.super"
)
tdSql
.
error
(
"select last_row(ceil(c5)) from db.super"
)
tdSql
.
error
(
"select last_row(ceil(c7)) from db.super"
)
tdSql
.
error
(
"select last_row(ceil(c8)) from db.super"
)
tdSql
.
error
(
"select ceil(last_row(c2)) from db.super"
)
tdSql
.
error
(
"select ceil(last_row(c3)) from db.super"
)
tdSql
.
error
(
"select ceil(last_row(c4)) from db.super"
)
tdSql
.
error
(
"select ceil(last_row(c5)) from db.super"
)
tdSql
.
error
(
"select ceil(last_row(c7)) from db.super"
)
tdSql
.
error
(
"select ceil(last_row(c8)) from db.super"
)
tdSql
.
error
(
"select first(ceil(c2)) from db.super"
)
tdSql
.
error
(
"select first(ceil(c3)) from db.super"
)
tdSql
.
error
(
"select first(ceil(c4)) from db.super"
)
tdSql
.
error
(
"select first(ceil(c5)) from db.super"
)
tdSql
.
error
(
"select first(ceil(c7)) from db.super"
)
tdSql
.
error
(
"select first(ceil(c8)) from db.super"
)
tdSql
.
error
(
"select ceil(first(c2)) from db.super"
)
tdSql
.
error
(
"select ceil(first(c3)) from db.super"
)
tdSql
.
error
(
"select ceil(first(c4)) from db.super"
)
tdSql
.
error
(
"select ceil(first(c5)) from db.super"
)
tdSql
.
error
(
"select ceil(first(c7)) from db.super"
)
tdSql
.
error
(
"select ceil(first(c8)) from db.super"
)
tdSql
.
error
(
"select diff(ceil(c2)) from db.super"
)
tdSql
.
error
(
"select diff(ceil(c3)) from db.super"
)
tdSql
.
error
(
"select diff(ceil(c4)) from db.super"
)
tdSql
.
error
(
"select diff(ceil(c5)) from db.super"
)
tdSql
.
error
(
"select diff(ceil(c7)) from db.super"
)
tdSql
.
error
(
"select diff(ceil(c8)) from db.super"
)
tdSql
.
error
(
"select ceil(diff(c2)) from db.super"
)
tdSql
.
error
(
"select ceil(diff(c3)) from db.super"
)
tdSql
.
error
(
"select ceil(diff(c4)) from db.super"
)
tdSql
.
error
(
"select ceil(diff(c5)) from db.super"
)
tdSql
.
error
(
"select ceil(diff(c7)) from db.super"
)
tdSql
.
error
(
"select ceil(diff(c8)) from db.super"
)
tdSql
.
error
(
"select percentile(ceil(c2), 0) from db.super"
)
tdSql
.
error
(
"select percentile(ceil(c3), 0) from db.super"
)
tdSql
.
error
(
"select percentile(ceil(c4), 0) from db.super"
)
tdSql
.
error
(
"select percentile(ceil(c5), 0) from db.super"
)
tdSql
.
error
(
"select percentile(ceil(c7), 0) from db.super"
)
tdSql
.
error
(
"select percentile(ceil(c8), 0) from db.super"
)
tdSql
.
error
(
"select ceil(percentile(c2, 0)) from db.super"
)
tdSql
.
error
(
"select ceil(percentile(c3, 0)) from db.super"
)
tdSql
.
error
(
"select ceil(percentile(c4, 0)) from db.super"
)
tdSql
.
error
(
"select ceil(percentile(c5, 0)) from db.super"
)
tdSql
.
error
(
"select ceil(percentile(c7, 0)) from db.super"
)
tdSql
.
error
(
"select ceil(percentile(c8, 0)) from db.super"
)
tdSql
.
error
(
"select derivate(ceil(c2),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(ceil(c3),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(ceil(c4),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(ceil(c5),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(ceil(c7),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(ceil(c8),1s, 1) from db.super"
)
tdSql
.
error
(
"select ceil(derivate(c2,1s, 1)) from db.super"
)
tdSql
.
error
(
"select ceil(derivate(c3,1s, 1)) from db.super"
)
tdSql
.
error
(
"select ceil(derivate(c4,1s, 1)) from db.super"
)
tdSql
.
error
(
"select ceil(derivate(c5,1s, 1)) from db.super"
)
tdSql
.
error
(
"select ceil(derivate(c7,1s, 1)) from db.super"
)
tdSql
.
error
(
"select ceil(derivate(c8,1s, 1)) from db.super"
)
tdSql
.
error
(
"select leastsquares(ceil(c2),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(ceil(c3),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(ceil(c4),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(ceil(c5),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(ceil(c7),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(ceil(c8),1, 1) from db.super"
)
tdSql
.
error
(
"select ceil(leastsquares(c2,1, 1)) from db.super"
)
tdSql
.
error
(
"select ceil(leastsquares(c3,1, 1)) from db.super"
)
tdSql
.
error
(
"select ceil(leastsquares(c4,1, 1)) from db.super"
)
tdSql
.
error
(
"select ceil(leastsquares(c5,1, 1)) from db.super"
)
tdSql
.
error
(
"select ceil(leastsquares(c7,1, 1)) from db.super"
)
tdSql
.
error
(
"select ceil(leastsquares(c8,1, 1)) from db.super"
)
tdSql
.
error
(
"select count(ceil(c2)) from db.super"
)
tdSql
.
error
(
"select count(ceil(c3)) from db.super"
)
tdSql
.
error
(
"select count(ceil(c4)) from db.super"
)
tdSql
.
error
(
"select count(ceil(c5)) from db.super"
)
tdSql
.
error
(
"select count(ceil(c7)) from db.super"
)
tdSql
.
error
(
"select count(ceil(c8)) from db.super"
)
tdSql
.
error
(
"select ceil(count(c2)) from db.super"
)
tdSql
.
error
(
"select ceil(count(c3)) from db.super"
)
tdSql
.
error
(
"select ceil(count(c4)) from db.super"
)
tdSql
.
error
(
"select ceil(count(c5)) from db.super"
)
tdSql
.
error
(
"select ceil(count(c7)) from db.super"
)
tdSql
.
error
(
"select ceil(count(c8)) from db.super"
)
tdSql
.
error
(
"select twa(ceil(c2)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(ceil(c3)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(ceil(c4)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(ceil(c5)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(ceil(c7)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(ceil(c8)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select ceil(twa(c2)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select ceil(twa(c3)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select ceil(twa(c4)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select ceil(twa(c5)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select ceil(twa(c7)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select ceil(twa(c8)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select stddev(ceil(c2)) from db.super"
)
tdSql
.
error
(
"select stddev(ceil(c3)) from db.super"
)
tdSql
.
error
(
"select stddev(ceil(c4)) from db.super"
)
tdSql
.
error
(
"select stddev(ceil(c5)) from db.super"
)
tdSql
.
error
(
"select stddev(ceil(c7)) from db.super"
)
tdSql
.
error
(
"select stddev(ceil(c8)) from db.super"
)
tdSql
.
error
(
"select ceil(stddev(c2)) from db.super"
)
tdSql
.
error
(
"select ceil(stddev(c3)) from db.super"
)
tdSql
.
error
(
"select ceil(stddev(c4)) from db.super"
)
tdSql
.
error
(
"select ceil(stddev(c5)) from db.super"
)
tdSql
.
error
(
"select ceil(stddev(c7)) from db.super"
)
tdSql
.
error
(
"select ceil(stddev(c8)) from db.super"
)
tdSql
.
error
(
"select spread(ceil(c2)) from db.super"
)
tdSql
.
error
(
"select spread(ceil(c3)) from db.super"
)
tdSql
.
error
(
"select spread(ceil(c4)) from db.super"
)
tdSql
.
error
(
"select spread(ceil(c5)) from db.super"
)
tdSql
.
error
(
"select spread(ceil(c7)) from db.super"
)
tdSql
.
error
(
"select spread(ceil(c8)) from db.super"
)
tdSql
.
error
(
"select ceil(spread(c2)) from db.super"
)
tdSql
.
error
(
"select ceil(spread(c3)) from db.super"
)
tdSql
.
error
(
"select ceil(spread(c4)) from db.super"
)
tdSql
.
error
(
"select ceil(spread(c5)) from db.super"
)
tdSql
.
error
(
"select ceil(spread(c7)) from db.super"
)
tdSql
.
error
(
"select ceil(spread(c8)) from db.super"
)
tdSql
.
error
(
"select ceil(c2 + 1) from db.super"
)
tdSql
.
error
(
"select ceil(c3 + 1) from db.super"
)
tdSql
.
error
(
"select ceil(c4 + 1) from db.super"
)
tdSql
.
error
(
"select ceil(c5 + 1) from db.super"
)
tdSql
.
error
(
"select ceil(c7 + 1) from db.super"
)
tdSql
.
error
(
"select ceil(c8 + 1) from db.super"
)
tdSql
.
error
(
"select bottom(ceil(c2), 2) from db.super"
)
tdSql
.
error
(
"select bottom(ceil(c3), 2) from db.super"
)
tdSql
.
error
(
"select bottom(ceil(c4), 2) from db.super"
)
tdSql
.
error
(
"select bottom(ceil(c5), 2) from db.super"
)
tdSql
.
error
(
"select bottom(ceil(c7), 2) from db.super"
)
tdSql
.
error
(
"select bottom(ceil(c8), 2) from db.super"
)
tdSql
.
error
(
"select ceil(bottom(c2, 2)) from db.super"
)
tdSql
.
error
(
"select ceil(bottom(c3, 2)) from db.super"
)
tdSql
.
error
(
"select ceil(bottom(c4, 2)) from db.super"
)
tdSql
.
error
(
"select ceil(bottom(c5, 2)) from db.super"
)
tdSql
.
error
(
"select ceil(bottom(c7, 2)) from db.super"
)
tdSql
.
error
(
"select ceil(bottom(c8, 2)) from db.super"
)
tdSql
.
error
(
"select ceil(c2) + ceil(c3) from db.super"
)
tdSql
.
error
(
"select ceil(c3) + ceil(c4) from db.super"
)
tdSql
.
error
(
"select ceil(c4) + ceil(c5) from db.super"
)
tdSql
.
error
(
"select ceil(c5) + ceil(c7) from db.super"
)
tdSql
.
error
(
"select ceil(c7) + ceil(c8) from db.super"
)
tdSql
.
error
(
"select ceil(c8) + ceil(c2) from db.super"
)
tdSql
.
error
(
"select ceil(c2 + c3) from db.super"
)
tdSql
.
error
(
"select ceil(c3 + c4) from db.super"
)
tdSql
.
error
(
"select ceil(c4 + c5) from db.super"
)
tdSql
.
error
(
"select ceil(c5 + c7) from db.super"
)
tdSql
.
error
(
"select ceil(c7 + c8) from db.super"
)
tdSql
.
error
(
"select ceil(c8 + c2) from db.super"
)
# for table
tdSql
.
error
(
"select max(ceil(c2)) from db.t1"
)
tdSql
.
error
(
"select max(ceil(c3)) from db.t1"
)
tdSql
.
error
(
"select max(ceil(c4)) from db.t1"
)
tdSql
.
error
(
"select max(ceil(c5)) from db.t1"
)
tdSql
.
error
(
"select max(ceil(c7)) from db.t1"
)
tdSql
.
error
(
"select max(ceil(c8)) from db.t1"
)
tdSql
.
error
(
"select ceil(max(c2)) from db.t1"
)
tdSql
.
error
(
"select ceil(max(c3)) from db.t1"
)
tdSql
.
error
(
"select ceil(max(c4)) from db.t1"
)
tdSql
.
error
(
"select ceil(max(c5)) from db.t1"
)
tdSql
.
error
(
"select ceil(max(c7)) from db.t1"
)
tdSql
.
error
(
"select ceil(max(c8)) from db.t1"
)
tdSql
.
error
(
"select min(ceil(c2)) from db.t1"
)
tdSql
.
error
(
"select min(ceil(c3)) from db.t1"
)
tdSql
.
error
(
"select min(ceil(c4)) from db.t1"
)
tdSql
.
error
(
"select min(ceil(c5)) from db.t1"
)
tdSql
.
error
(
"select min(ceil(c7)) from db.t1"
)
tdSql
.
error
(
"select min(ceil(c8)) from db.t1"
)
tdSql
.
error
(
"select ceil(min(c2)) from db.t1"
)
tdSql
.
error
(
"select ceil(min(c3)) from db.t1"
)
tdSql
.
error
(
"select ceil(min(c4)) from db.t1"
)
tdSql
.
error
(
"select ceil(min(c5)) from db.t1"
)
tdSql
.
error
(
"select ceil(min(c7)) from db.t1"
)
tdSql
.
error
(
"select ceil(min(c8)) from db.t1"
)
tdSql
.
error
(
"select avg(ceil(c2)) from db.t1"
)
tdSql
.
error
(
"select avg(ceil(c3)) from db.t1"
)
tdSql
.
error
(
"select avg(ceil(c4)) from db.t1"
)
tdSql
.
error
(
"select avg(ceil(c5)) from db.t1"
)
tdSql
.
error
(
"select avg(ceil(c7)) from db.t1"
)
tdSql
.
error
(
"select avg(ceil(c8)) from db.t1"
)
tdSql
.
error
(
"select ceil(avg(c2)) from db.t1"
)
tdSql
.
error
(
"select ceil(avg(c3)) from db.t1"
)
tdSql
.
error
(
"select ceil(avg(c4)) from db.t1"
)
tdSql
.
error
(
"select ceil(avg(c5)) from db.t1"
)
tdSql
.
error
(
"select ceil(avg(c7)) from db.t1"
)
tdSql
.
error
(
"select ceil(avg(c8)) from db.t1"
)
tdSql
.
error
(
"select last(ceil(c2)) from db.t1"
)
tdSql
.
error
(
"select last(ceil(c3)) from db.t1"
)
tdSql
.
error
(
"select last(ceil(c4)) from db.t1"
)
tdSql
.
error
(
"select last(ceil(c5)) from db.t1"
)
tdSql
.
error
(
"select last(ceil(c7)) from db.t1"
)
tdSql
.
error
(
"select last(ceil(c8)) from db.t1"
)
tdSql
.
error
(
"select ceil(last(c2)) from db.t1"
)
tdSql
.
error
(
"select ceil(last(c3)) from db.t1"
)
tdSql
.
error
(
"select ceil(last(c4)) from db.t1"
)
tdSql
.
error
(
"select ceil(last(c5)) from db.t1"
)
tdSql
.
error
(
"select ceil(last(c7)) from db.t1"
)
tdSql
.
error
(
"select ceil(last(c8)) from db.t1"
)
tdSql
.
error
(
"select last_row(ceil(c2)) from db.t1"
)
tdSql
.
error
(
"select last_row(ceil(c3)) from db.t1"
)
tdSql
.
error
(
"select last_row(ceil(c4)) from db.t1"
)
tdSql
.
error
(
"select last_row(ceil(c5)) from db.t1"
)
tdSql
.
error
(
"select last_row(ceil(c7)) from db.t1"
)
tdSql
.
error
(
"select last_row(ceil(c8)) from db.t1"
)
tdSql
.
error
(
"select ceil(last_row(c2)) from db.t1"
)
tdSql
.
error
(
"select ceil(last_row(c3)) from db.t1"
)
tdSql
.
error
(
"select ceil(last_row(c4)) from db.t1"
)
tdSql
.
error
(
"select ceil(last_row(c5)) from db.t1"
)
tdSql
.
error
(
"select ceil(last_row(c7)) from db.t1"
)
tdSql
.
error
(
"select ceil(last_row(c8)) from db.t1"
)
tdSql
.
error
(
"select first(ceil(c2)) from db.t1"
)
tdSql
.
error
(
"select first(ceil(c3)) from db.t1"
)
tdSql
.
error
(
"select first(ceil(c4)) from db.t1"
)
tdSql
.
error
(
"select first(ceil(c5)) from db.t1"
)
tdSql
.
error
(
"select first(ceil(c7)) from db.t1"
)
tdSql
.
error
(
"select first(ceil(c8)) from db.t1"
)
tdSql
.
error
(
"select ceil(first(c2)) from db.t1"
)
tdSql
.
error
(
"select ceil(first(c3)) from db.t1"
)
tdSql
.
error
(
"select ceil(first(c4)) from db.t1"
)
tdSql
.
error
(
"select ceil(first(c5)) from db.t1"
)
tdSql
.
error
(
"select ceil(first(c7)) from db.t1"
)
tdSql
.
error
(
"select ceil(first(c8)) from db.t1"
)
tdSql
.
error
(
"select diff(ceil(c2)) from db.t1"
)
tdSql
.
error
(
"select diff(ceil(c3)) from db.t1"
)
tdSql
.
error
(
"select diff(ceil(c4)) from db.t1"
)
tdSql
.
error
(
"select diff(ceil(c5)) from db.t1"
)
tdSql
.
error
(
"select diff(ceil(c7)) from db.t1"
)
tdSql
.
error
(
"select diff(ceil(c8)) from db.t1"
)
tdSql
.
error
(
"select ceil(diff(c2)) from db.t1"
)
tdSql
.
error
(
"select ceil(diff(c3)) from db.t1"
)
tdSql
.
error
(
"select ceil(diff(c4)) from db.t1"
)
tdSql
.
error
(
"select ceil(diff(c5)) from db.t1"
)
tdSql
.
error
(
"select ceil(diff(c7)) from db.t1"
)
tdSql
.
error
(
"select ceil(diff(c8)) from db.t1"
)
tdSql
.
error
(
"select percentile(ceil(c2), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(ceil(c3), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(ceil(c4), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(ceil(c5), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(ceil(c7), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(ceil(c8), 0) from db.t1"
)
tdSql
.
error
(
"select ceil(percentile(c2, 0)) from db.t1"
)
tdSql
.
error
(
"select ceil(percentile(c3, 0)) from db.t1"
)
tdSql
.
error
(
"select ceil(percentile(c4, 0)) from db.t1"
)
tdSql
.
error
(
"select ceil(percentile(c5, 0)) from db.t1"
)
tdSql
.
error
(
"select ceil(percentile(c7, 0)) from db.t1"
)
tdSql
.
error
(
"select ceil(percentile(c8, 0)) from db.t1"
)
tdSql
.
error
(
"select derivate(ceil(c2),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(ceil(c3),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(ceil(c4),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(ceil(c5),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(ceil(c7),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(ceil(c8),1s, 1) from db.t1"
)
tdSql
.
error
(
"select ceil(derivate(c2,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select ceil(derivate(c3,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select ceil(derivate(c4,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select ceil(derivate(c5,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select ceil(derivate(c7,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select ceil(derivate(c8,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select leastsquares(ceil(c2),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(ceil(c3),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(ceil(c4),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(ceil(c5),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(ceil(c7),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(ceil(c8),1, 1) from db.t1"
)
tdSql
.
error
(
"select ceil(leastsquares(c2,1, 1)) from db.t1"
)
tdSql
.
error
(
"select ceil(leastsquares(c3,1, 1)) from db.t1"
)
tdSql
.
error
(
"select ceil(leastsquares(c4,1, 1)) from db.t1"
)
tdSql
.
error
(
"select ceil(leastsquares(c5,1, 1)) from db.t1"
)
tdSql
.
error
(
"select ceil(leastsquares(c7,1, 1)) from db.t1"
)
tdSql
.
error
(
"select ceil(leastsquares(c8,1, 1)) from db.t1"
)
tdSql
.
error
(
"select count(ceil(c2)) from db.t1"
)
tdSql
.
error
(
"select count(ceil(c3)) from db.t1"
)
tdSql
.
error
(
"select count(ceil(c4)) from db.t1"
)
tdSql
.
error
(
"select count(ceil(c5)) from db.t1"
)
tdSql
.
error
(
"select count(ceil(c7)) from db.t1"
)
tdSql
.
error
(
"select count(ceil(c8)) from db.t1"
)
tdSql
.
error
(
"select ceil(count(c2)) from db.t1"
)
tdSql
.
error
(
"select ceil(count(c3)) from db.t1"
)
tdSql
.
error
(
"select ceil(count(c4)) from db.t1"
)
tdSql
.
error
(
"select ceil(count(c5)) from db.t1"
)
tdSql
.
error
(
"select ceil(count(c7)) from db.t1"
)
tdSql
.
error
(
"select ceil(count(c8)) from db.t1"
)
tdSql
.
error
(
"select twa(ceil(c2)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(ceil(c3)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(ceil(c4)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(ceil(c5)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(ceil(c7)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(ceil(c8)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select ceil(twa(c2)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select ceil(twa(c3)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select ceil(twa(c4)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select ceil(twa(c5)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select ceil(twa(c7)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select ceil(twa(c8)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select stddev(ceil(c2)) from db.t1"
)
tdSql
.
error
(
"select stddev(ceil(c3)) from db.t1"
)
tdSql
.
error
(
"select stddev(ceil(c4)) from db.t1"
)
tdSql
.
error
(
"select stddev(ceil(c5)) from db.t1"
)
tdSql
.
error
(
"select stddev(ceil(c7)) from db.t1"
)
tdSql
.
error
(
"select stddev(ceil(c8)) from db.t1"
)
tdSql
.
error
(
"select ceil(stddev(c2)) from db.t1"
)
tdSql
.
error
(
"select ceil(stddev(c3)) from db.t1"
)
tdSql
.
error
(
"select ceil(stddev(c4)) from db.t1"
)
tdSql
.
error
(
"select ceil(stddev(c5)) from db.t1"
)
tdSql
.
error
(
"select ceil(stddev(c7)) from db.t1"
)
tdSql
.
error
(
"select ceil(stddev(c8)) from db.t1"
)
tdSql
.
error
(
"select spread(ceil(c2)) from db.t1"
)
tdSql
.
error
(
"select spread(ceil(c3)) from db.t1"
)
tdSql
.
error
(
"select spread(ceil(c4)) from db.t1"
)
tdSql
.
error
(
"select spread(ceil(c5)) from db.t1"
)
tdSql
.
error
(
"select spread(ceil(c7)) from db.t1"
)
tdSql
.
error
(
"select spread(ceil(c8)) from db.t1"
)
tdSql
.
error
(
"select ceil(spread(c2)) from db.t1"
)
tdSql
.
error
(
"select ceil(spread(c3)) from db.t1"
)
tdSql
.
error
(
"select ceil(spread(c4)) from db.t1"
)
tdSql
.
error
(
"select ceil(spread(c5)) from db.t1"
)
tdSql
.
error
(
"select ceil(spread(c7)) from db.t1"
)
tdSql
.
error
(
"select ceil(spread(c8)) from db.t1"
)
tdSql
.
error
(
"select ceil(c2 + 1) from db.t1"
)
tdSql
.
error
(
"select ceil(c3 + 1) from db.t1"
)
tdSql
.
error
(
"select ceil(c4 + 1) from db.t1"
)
tdSql
.
error
(
"select ceil(c5 + 1) from db.t1"
)
tdSql
.
error
(
"select ceil(c7 + 1) from db.t1"
)
tdSql
.
error
(
"select ceil(c8 + 1) from db.t1"
)
tdSql
.
error
(
"select bottom(ceil(c2), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(ceil(c3), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(ceil(c4), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(ceil(c5), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(ceil(c7), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(ceil(c8), 2) from db.t1"
)
tdSql
.
error
(
"select ceil(bottom(c2, 2)) from db.t1"
)
tdSql
.
error
(
"select ceil(bottom(c3, 2)) from db.t1"
)
tdSql
.
error
(
"select ceil(bottom(c4, 2)) from db.t1"
)
tdSql
.
error
(
"select ceil(bottom(c5, 2)) from db.t1"
)
tdSql
.
error
(
"select ceil(bottom(c7, 2)) from db.t1"
)
tdSql
.
error
(
"select ceil(bottom(c8, 2)) from db.t1"
)
tdSql
.
error
(
"select ceil(c2) + ceil(c3) from db.t1"
)
tdSql
.
error
(
"select ceil(c3) + ceil(c4) from db.t1"
)
tdSql
.
error
(
"select ceil(c4) + ceil(c5) from db.t1"
)
tdSql
.
error
(
"select ceil(c5) + ceil(c7) from db.t1"
)
tdSql
.
error
(
"select ceil(c7) + ceil(c8) from db.t1"
)
tdSql
.
error
(
"select ceil(c8) + ceil(c2) from db.t1"
)
tdSql
.
error
(
"select ceil(c2 + c3) from db.t1"
)
tdSql
.
error
(
"select ceil(c3 + c4) from db.t1"
)
tdSql
.
error
(
"select ceil(c4 + c5) from db.t1"
)
tdSql
.
error
(
"select ceil(c5 + c7) from db.t1"
)
tdSql
.
error
(
"select ceil(c7 + c8) from db.t1"
)
tdSql
.
error
(
"select ceil(c8 + c2) from db.t1"
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
\ No newline at end of file
tests/pytest/functions/function_floor.py
0 → 100644
浏览文件 @
f359ff2c
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
sys
import
taos
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
import
numpy
as
np
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
def
run
(
self
):
tdSql
.
prepare
()
tdSql
.
execute
(
"create stable super (ts timestamp, c1 timestamp, c2 int, c3 bigint, c4 float, c5 double, c6 binary(8), c7 smallint, c8 tinyint, c9 bool, c10 nchar(8)) tags (t1 int, t2 bigint, t3 float, t4 double, t5 binary(8), t6 smallint, t7 tinyint, t8 bool, t9 nchar(8))"
)
tdSql
.
execute
(
"create table t1 using super tags (1, 8, 1.0, 1.0, 'abcdefgh', 1, 1, 1, 'abcdeffh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000000, 1537146000000, 1, 1, 1.0, 1.0, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000001, 1537146000000, 1, 1, 1.1, 1.1, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000002, 1537146000000, 1, 1, 1.2, 1.2, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000003, 1537146000000, 1, 1, 1.3, 1.3, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000004, 1537146000000, 1, 1, 1.4, 1.4, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000005, 1537146000000, 1, 1, 1.5, 1.5, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000006, 1537146000000, 1, 1, 1.6, 1.6, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000007, 1537146000000, 1, 1, 1.7, 1.7, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000008, 1537146000000, 1, 1, 1.8, 1.8, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000009, 1537146000000, 1, 1, 1.9, 1.9, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000010, 1537146000000, 1, 1, 1.4444445, 1.444445, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000011, 1537146000000, -1, -1, -1.0, -1.0, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000012, 1537146000000, -1, -1, -1.1, -1.1, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000013, 1537146000000, -1, -1, -1.2, -1.2, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000014, 1537146000000, -1, -1, -1.3, -1.3, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000015, 1537146000000, -1, -1, -1.4, -1.4, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000016, 1537146000000, -1, -1, -1.5, -1.5, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000017, 1537146000000, -1, -1, -1.6, -1.6, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000018, 1537146000000, -1, -1, -1.7, -1.7, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000019, 1537146000000, -1, -1, -1.8, -1.8, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000020, 1537146000000, -1, -1, -1.9, -1.9, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000021, 1537146000000, -1, -1, -1.4444445, -1.444445, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
# tags does not support floor
# for stable
tdSql
.
error
(
"select floor(t1) from db.super"
)
tdSql
.
error
(
"select floor(t2) from db.super"
)
tdSql
.
error
(
"select floor(t3) from db.super"
)
tdSql
.
error
(
"select floor(t4) from db.super"
)
tdSql
.
error
(
"select floor(t5) from db.super"
)
tdSql
.
error
(
"select floor(t6) from db.super"
)
tdSql
.
error
(
"select floor(t7) from db.super"
)
tdSql
.
error
(
"select floor(t8) from db.super"
)
tdSql
.
error
(
"select floor(t9) from db.super"
)
# for table
tdSql
.
error
(
"select floor(t1) from db.t1"
)
tdSql
.
error
(
"select floor(t2) from db.t1"
)
tdSql
.
error
(
"select floor(t3) from db.t1"
)
tdSql
.
error
(
"select floor(t4) from db.t1"
)
tdSql
.
error
(
"select floor(t5) from db.t1"
)
tdSql
.
error
(
"select floor(t6) from db.t1"
)
tdSql
.
error
(
"select floor(t7) from db.t1"
)
tdSql
.
error
(
"select floor(t8) from db.t1"
)
tdSql
.
error
(
"select floor(t9) from db.t1"
)
# check support columns
# for stable
tdSql
.
error
(
"select floor(ts) from db.super"
)
tdSql
.
error
(
"select floor(c1) from db.super"
)
tdSql
.
query
(
"select floor(c2) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select floor(c3) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select floor(c4) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
==
0
:
tdSql
.
checkData
(
0
,
0
,
1
)
if
0
<
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
if
i
==
11
:
tdSql
.
checkData
(
11
,
0
,
-
1
)
if
i
>
11
:
tdSql
.
checkData
(
i
,
0
,
-
2
)
tdSql
.
query
(
"select floor(c5) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
==
0
:
tdSql
.
checkData
(
0
,
0
,
1
)
if
0
<
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
if
i
==
11
:
tdSql
.
checkData
(
11
,
0
,
-
1
)
if
i
>
11
:
tdSql
.
checkData
(
i
,
0
,
-
2
)
tdSql
.
error
(
"select floor(c6) from db.super"
)
tdSql
.
query
(
"select floor(c7) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select floor(c8) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
error
(
"select floor(c9) from db.super"
)
tdSql
.
error
(
"select floor(c10) from db.super"
)
# for table
tdSql
.
error
(
"select floor(ts) from db.t1"
)
tdSql
.
error
(
"select floor(c1) from db.t1"
)
tdSql
.
query
(
"select floor(c2) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select floor(c3) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select floor(c4) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
==
0
:
tdSql
.
checkData
(
0
,
0
,
1
)
if
0
<
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
if
i
==
11
:
tdSql
.
checkData
(
11
,
0
,
-
1
)
if
i
>
11
:
tdSql
.
checkData
(
i
,
0
,
-
2
)
tdSql
.
query
(
"select floor(c5) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
==
0
:
tdSql
.
checkData
(
0
,
0
,
1
)
if
0
<
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
if
i
==
11
:
tdSql
.
checkData
(
11
,
0
,
-
1
)
if
i
>
11
:
tdSql
.
checkData
(
i
,
0
,
-
2
)
tdSql
.
error
(
"select floor(c6) from db.t1"
)
tdSql
.
query
(
"select floor(c7) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select floor(c8) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
error
(
"select floor(c9) from db.t1"
)
tdSql
.
error
(
"select floor(c10) from db.t1"
)
# does not support aggregation
# for super table
tdSql
.
error
(
"select max(floor(c2)) from db.super"
)
tdSql
.
error
(
"select max(floor(c3)) from db.super"
)
tdSql
.
error
(
"select max(floor(c4)) from db.super"
)
tdSql
.
error
(
"select max(floor(c5)) from db.super"
)
tdSql
.
error
(
"select max(floor(c7)) from db.super"
)
tdSql
.
error
(
"select max(floor(c8)) from db.super"
)
tdSql
.
error
(
"select floor(max(c2)) from db.super"
)
tdSql
.
error
(
"select floor(max(c3)) from db.super"
)
tdSql
.
error
(
"select floor(max(c4)) from db.super"
)
tdSql
.
error
(
"select floor(max(c5)) from db.super"
)
tdSql
.
error
(
"select floor(max(c7)) from db.super"
)
tdSql
.
error
(
"select floor(max(c8)) from db.super"
)
tdSql
.
error
(
"select min(floor(c2)) from db.super"
)
tdSql
.
error
(
"select min(floor(c3)) from db.super"
)
tdSql
.
error
(
"select min(floor(c4)) from db.super"
)
tdSql
.
error
(
"select min(floor(c5)) from db.super"
)
tdSql
.
error
(
"select min(floor(c7)) from db.super"
)
tdSql
.
error
(
"select min(floor(c8)) from db.super"
)
tdSql
.
error
(
"select floor(min(c2)) from db.super"
)
tdSql
.
error
(
"select floor(min(c3)) from db.super"
)
tdSql
.
error
(
"select floor(min(c4)) from db.super"
)
tdSql
.
error
(
"select floor(min(c5)) from db.super"
)
tdSql
.
error
(
"select floor(min(c7)) from db.super"
)
tdSql
.
error
(
"select floor(min(c8)) from db.super"
)
tdSql
.
error
(
"select avg(floor(c2)) from db.super"
)
tdSql
.
error
(
"select avg(floor(c3)) from db.super"
)
tdSql
.
error
(
"select avg(floor(c4)) from db.super"
)
tdSql
.
error
(
"select avg(floor(c5)) from db.super"
)
tdSql
.
error
(
"select avg(floor(c7)) from db.super"
)
tdSql
.
error
(
"select avg(floor(c8)) from db.super"
)
tdSql
.
error
(
"select floor(avg(c2)) from db.super"
)
tdSql
.
error
(
"select floor(avg(c3)) from db.super"
)
tdSql
.
error
(
"select floor(avg(c4)) from db.super"
)
tdSql
.
error
(
"select floor(avg(c5)) from db.super"
)
tdSql
.
error
(
"select floor(avg(c7)) from db.super"
)
tdSql
.
error
(
"select floor(avg(c8)) from db.super"
)
tdSql
.
error
(
"select last(floor(c2)) from db.super"
)
tdSql
.
error
(
"select last(floor(c3)) from db.super"
)
tdSql
.
error
(
"select last(floor(c4)) from db.super"
)
tdSql
.
error
(
"select last(floor(c5)) from db.super"
)
tdSql
.
error
(
"select last(floor(c7)) from db.super"
)
tdSql
.
error
(
"select last(floor(c8)) from db.super"
)
tdSql
.
error
(
"select floor(last(c2)) from db.super"
)
tdSql
.
error
(
"select floor(last(c3)) from db.super"
)
tdSql
.
error
(
"select floor(last(c4)) from db.super"
)
tdSql
.
error
(
"select floor(last(c5)) from db.super"
)
tdSql
.
error
(
"select floor(last(c7)) from db.super"
)
tdSql
.
error
(
"select floor(last(c8)) from db.super"
)
tdSql
.
error
(
"select last_row(floor(c2)) from db.super"
)
tdSql
.
error
(
"select last_row(floor(c3)) from db.super"
)
tdSql
.
error
(
"select last_row(floor(c4)) from db.super"
)
tdSql
.
error
(
"select last_row(floor(c5)) from db.super"
)
tdSql
.
error
(
"select last_row(floor(c7)) from db.super"
)
tdSql
.
error
(
"select last_row(floor(c8)) from db.super"
)
tdSql
.
error
(
"select floor(last_row(c2)) from db.super"
)
tdSql
.
error
(
"select floor(last_row(c3)) from db.super"
)
tdSql
.
error
(
"select floor(last_row(c4)) from db.super"
)
tdSql
.
error
(
"select floor(last_row(c5)) from db.super"
)
tdSql
.
error
(
"select floor(last_row(c7)) from db.super"
)
tdSql
.
error
(
"select floor(last_row(c8)) from db.super"
)
tdSql
.
error
(
"select first(floor(c2)) from db.super"
)
tdSql
.
error
(
"select first(floor(c3)) from db.super"
)
tdSql
.
error
(
"select first(floor(c4)) from db.super"
)
tdSql
.
error
(
"select first(floor(c5)) from db.super"
)
tdSql
.
error
(
"select first(floor(c7)) from db.super"
)
tdSql
.
error
(
"select first(floor(c8)) from db.super"
)
tdSql
.
error
(
"select floor(first(c2)) from db.super"
)
tdSql
.
error
(
"select floor(first(c3)) from db.super"
)
tdSql
.
error
(
"select floor(first(c4)) from db.super"
)
tdSql
.
error
(
"select floor(first(c5)) from db.super"
)
tdSql
.
error
(
"select floor(first(c7)) from db.super"
)
tdSql
.
error
(
"select floor(first(c8)) from db.super"
)
tdSql
.
error
(
"select diff(floor(c2)) from db.super"
)
tdSql
.
error
(
"select diff(floor(c3)) from db.super"
)
tdSql
.
error
(
"select diff(floor(c4)) from db.super"
)
tdSql
.
error
(
"select diff(floor(c5)) from db.super"
)
tdSql
.
error
(
"select diff(floor(c7)) from db.super"
)
tdSql
.
error
(
"select diff(floor(c8)) from db.super"
)
tdSql
.
error
(
"select floor(diff(c2)) from db.super"
)
tdSql
.
error
(
"select floor(diff(c3)) from db.super"
)
tdSql
.
error
(
"select floor(diff(c4)) from db.super"
)
tdSql
.
error
(
"select floor(diff(c5)) from db.super"
)
tdSql
.
error
(
"select floor(diff(c7)) from db.super"
)
tdSql
.
error
(
"select floor(diff(c8)) from db.super"
)
tdSql
.
error
(
"select percentile(floor(c2), 0) from db.super"
)
tdSql
.
error
(
"select percentile(floor(c3), 0) from db.super"
)
tdSql
.
error
(
"select percentile(floor(c4), 0) from db.super"
)
tdSql
.
error
(
"select percentile(floor(c5), 0) from db.super"
)
tdSql
.
error
(
"select percentile(floor(c7), 0) from db.super"
)
tdSql
.
error
(
"select percentile(floor(c8), 0) from db.super"
)
tdSql
.
error
(
"select floor(percentile(c2, 0)) from db.super"
)
tdSql
.
error
(
"select floor(percentile(c3, 0)) from db.super"
)
tdSql
.
error
(
"select floor(percentile(c4, 0)) from db.super"
)
tdSql
.
error
(
"select floor(percentile(c5, 0)) from db.super"
)
tdSql
.
error
(
"select floor(percentile(c7, 0)) from db.super"
)
tdSql
.
error
(
"select floor(percentile(c8, 0)) from db.super"
)
tdSql
.
error
(
"select derivate(floor(c2),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(floor(c3),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(floor(c4),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(floor(c5),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(floor(c7),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(floor(c8),1s, 1) from db.super"
)
tdSql
.
error
(
"select floor(derivate(c2,1s, 1)) from db.super"
)
tdSql
.
error
(
"select floor(derivate(c3,1s, 1)) from db.super"
)
tdSql
.
error
(
"select floor(derivate(c4,1s, 1)) from db.super"
)
tdSql
.
error
(
"select floor(derivate(c5,1s, 1)) from db.super"
)
tdSql
.
error
(
"select floor(derivate(c7,1s, 1)) from db.super"
)
tdSql
.
error
(
"select floor(derivate(c8,1s, 1)) from db.super"
)
tdSql
.
error
(
"select leastsquares(floor(c2),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(floor(c3),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(floor(c4),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(floor(c5),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(floor(c7),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(floor(c8),1, 1) from db.super"
)
tdSql
.
error
(
"select floor(leastsquares(c2,1, 1)) from db.super"
)
tdSql
.
error
(
"select floor(leastsquares(c3,1, 1)) from db.super"
)
tdSql
.
error
(
"select floor(leastsquares(c4,1, 1)) from db.super"
)
tdSql
.
error
(
"select floor(leastsquares(c5,1, 1)) from db.super"
)
tdSql
.
error
(
"select floor(leastsquares(c7,1, 1)) from db.super"
)
tdSql
.
error
(
"select floor(leastsquares(c8,1, 1)) from db.super"
)
tdSql
.
error
(
"select count(floor(c2)) from db.super"
)
tdSql
.
error
(
"select count(floor(c3)) from db.super"
)
tdSql
.
error
(
"select count(floor(c4)) from db.super"
)
tdSql
.
error
(
"select count(floor(c5)) from db.super"
)
tdSql
.
error
(
"select count(floor(c7)) from db.super"
)
tdSql
.
error
(
"select count(floor(c8)) from db.super"
)
tdSql
.
error
(
"select floor(count(c2)) from db.super"
)
tdSql
.
error
(
"select floor(count(c3)) from db.super"
)
tdSql
.
error
(
"select floor(count(c4)) from db.super"
)
tdSql
.
error
(
"select floor(count(c5)) from db.super"
)
tdSql
.
error
(
"select floor(count(c7)) from db.super"
)
tdSql
.
error
(
"select floor(count(c8)) from db.super"
)
tdSql
.
error
(
"select twa(floor(c2)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(floor(c3)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(floor(c4)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(floor(c5)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(floor(c7)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(floor(c8)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select floor(twa(c2)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select floor(twa(c3)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select floor(twa(c4)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select floor(twa(c5)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select floor(twa(c7)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select floor(twa(c8)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select stddev(floor(c2)) from db.super"
)
tdSql
.
error
(
"select stddev(floor(c3)) from db.super"
)
tdSql
.
error
(
"select stddev(floor(c4)) from db.super"
)
tdSql
.
error
(
"select stddev(floor(c5)) from db.super"
)
tdSql
.
error
(
"select stddev(floor(c7)) from db.super"
)
tdSql
.
error
(
"select stddev(floor(c8)) from db.super"
)
tdSql
.
error
(
"select floor(stddev(c2)) from db.super"
)
tdSql
.
error
(
"select floor(stddev(c3)) from db.super"
)
tdSql
.
error
(
"select floor(stddev(c4)) from db.super"
)
tdSql
.
error
(
"select floor(stddev(c5)) from db.super"
)
tdSql
.
error
(
"select floor(stddev(c7)) from db.super"
)
tdSql
.
error
(
"select floor(stddev(c8)) from db.super"
)
tdSql
.
error
(
"select spread(floor(c2)) from db.super"
)
tdSql
.
error
(
"select spread(floor(c3)) from db.super"
)
tdSql
.
error
(
"select spread(floor(c4)) from db.super"
)
tdSql
.
error
(
"select spread(floor(c5)) from db.super"
)
tdSql
.
error
(
"select spread(floor(c7)) from db.super"
)
tdSql
.
error
(
"select spread(floor(c8)) from db.super"
)
tdSql
.
error
(
"select floor(spread(c2)) from db.super"
)
tdSql
.
error
(
"select floor(spread(c3)) from db.super"
)
tdSql
.
error
(
"select floor(spread(c4)) from db.super"
)
tdSql
.
error
(
"select floor(spread(c5)) from db.super"
)
tdSql
.
error
(
"select floor(spread(c7)) from db.super"
)
tdSql
.
error
(
"select floor(spread(c8)) from db.super"
)
tdSql
.
error
(
"select floor(c2 + 1) from db.super"
)
tdSql
.
error
(
"select floor(c3 + 1) from db.super"
)
tdSql
.
error
(
"select floor(c4 + 1) from db.super"
)
tdSql
.
error
(
"select floor(c5 + 1) from db.super"
)
tdSql
.
error
(
"select floor(c7 + 1) from db.super"
)
tdSql
.
error
(
"select floor(c8 + 1) from db.super"
)
tdSql
.
error
(
"select bottom(floor(c2), 2) from db.super"
)
tdSql
.
error
(
"select bottom(floor(c3), 2) from db.super"
)
tdSql
.
error
(
"select bottom(floor(c4), 2) from db.super"
)
tdSql
.
error
(
"select bottom(floor(c5), 2) from db.super"
)
tdSql
.
error
(
"select bottom(floor(c7), 2) from db.super"
)
tdSql
.
error
(
"select bottom(floor(c8), 2) from db.super"
)
tdSql
.
error
(
"select floor(bottom(c2, 2)) from db.super"
)
tdSql
.
error
(
"select floor(bottom(c3, 2)) from db.super"
)
tdSql
.
error
(
"select floor(bottom(c4, 2)) from db.super"
)
tdSql
.
error
(
"select floor(bottom(c5, 2)) from db.super"
)
tdSql
.
error
(
"select floor(bottom(c7, 2)) from db.super"
)
tdSql
.
error
(
"select floor(bottom(c8, 2)) from db.super"
)
tdSql
.
error
(
"select floor(c2) + floor(c3) from db.super"
)
tdSql
.
error
(
"select floor(c3) + floor(c4) from db.super"
)
tdSql
.
error
(
"select floor(c4) + floor(c5) from db.super"
)
tdSql
.
error
(
"select floor(c5) + floor(c7) from db.super"
)
tdSql
.
error
(
"select floor(c7) + floor(c8) from db.super"
)
tdSql
.
error
(
"select floor(c8) + floor(c2) from db.super"
)
tdSql
.
error
(
"select floor(c2 + c3) from db.super"
)
tdSql
.
error
(
"select floor(c3 + c4) from db.super"
)
tdSql
.
error
(
"select floor(c4 + c5) from db.super"
)
tdSql
.
error
(
"select floor(c5 + c7) from db.super"
)
tdSql
.
error
(
"select floor(c7 + c8) from db.super"
)
tdSql
.
error
(
"select floor(c8 + c2) from db.super"
)
# for table
tdSql
.
error
(
"select max(floor(c2)) from db.t1"
)
tdSql
.
error
(
"select max(floor(c3)) from db.t1"
)
tdSql
.
error
(
"select max(floor(c4)) from db.t1"
)
tdSql
.
error
(
"select max(floor(c5)) from db.t1"
)
tdSql
.
error
(
"select max(floor(c7)) from db.t1"
)
tdSql
.
error
(
"select max(floor(c8)) from db.t1"
)
tdSql
.
error
(
"select floor(max(c2)) from db.t1"
)
tdSql
.
error
(
"select floor(max(c3)) from db.t1"
)
tdSql
.
error
(
"select floor(max(c4)) from db.t1"
)
tdSql
.
error
(
"select floor(max(c5)) from db.t1"
)
tdSql
.
error
(
"select floor(max(c7)) from db.t1"
)
tdSql
.
error
(
"select floor(max(c8)) from db.t1"
)
tdSql
.
error
(
"select min(floor(c2)) from db.t1"
)
tdSql
.
error
(
"select min(floor(c3)) from db.t1"
)
tdSql
.
error
(
"select min(floor(c4)) from db.t1"
)
tdSql
.
error
(
"select min(floor(c5)) from db.t1"
)
tdSql
.
error
(
"select min(floor(c7)) from db.t1"
)
tdSql
.
error
(
"select min(floor(c8)) from db.t1"
)
tdSql
.
error
(
"select floor(min(c2)) from db.t1"
)
tdSql
.
error
(
"select floor(min(c3)) from db.t1"
)
tdSql
.
error
(
"select floor(min(c4)) from db.t1"
)
tdSql
.
error
(
"select floor(min(c5)) from db.t1"
)
tdSql
.
error
(
"select floor(min(c7)) from db.t1"
)
tdSql
.
error
(
"select floor(min(c8)) from db.t1"
)
tdSql
.
error
(
"select avg(floor(c2)) from db.t1"
)
tdSql
.
error
(
"select avg(floor(c3)) from db.t1"
)
tdSql
.
error
(
"select avg(floor(c4)) from db.t1"
)
tdSql
.
error
(
"select avg(floor(c5)) from db.t1"
)
tdSql
.
error
(
"select avg(floor(c7)) from db.t1"
)
tdSql
.
error
(
"select avg(floor(c8)) from db.t1"
)
tdSql
.
error
(
"select floor(avg(c2)) from db.t1"
)
tdSql
.
error
(
"select floor(avg(c3)) from db.t1"
)
tdSql
.
error
(
"select floor(avg(c4)) from db.t1"
)
tdSql
.
error
(
"select floor(avg(c5)) from db.t1"
)
tdSql
.
error
(
"select floor(avg(c7)) from db.t1"
)
tdSql
.
error
(
"select floor(avg(c8)) from db.t1"
)
tdSql
.
error
(
"select last(floor(c2)) from db.t1"
)
tdSql
.
error
(
"select last(floor(c3)) from db.t1"
)
tdSql
.
error
(
"select last(floor(c4)) from db.t1"
)
tdSql
.
error
(
"select last(floor(c5)) from db.t1"
)
tdSql
.
error
(
"select last(floor(c7)) from db.t1"
)
tdSql
.
error
(
"select last(floor(c8)) from db.t1"
)
tdSql
.
error
(
"select floor(last(c2)) from db.t1"
)
tdSql
.
error
(
"select floor(last(c3)) from db.t1"
)
tdSql
.
error
(
"select floor(last(c4)) from db.t1"
)
tdSql
.
error
(
"select floor(last(c5)) from db.t1"
)
tdSql
.
error
(
"select floor(last(c7)) from db.t1"
)
tdSql
.
error
(
"select floor(last(c8)) from db.t1"
)
tdSql
.
error
(
"select last_row(floor(c2)) from db.t1"
)
tdSql
.
error
(
"select last_row(floor(c3)) from db.t1"
)
tdSql
.
error
(
"select last_row(floor(c4)) from db.t1"
)
tdSql
.
error
(
"select last_row(floor(c5)) from db.t1"
)
tdSql
.
error
(
"select last_row(floor(c7)) from db.t1"
)
tdSql
.
error
(
"select last_row(floor(c8)) from db.t1"
)
tdSql
.
error
(
"select floor(last_row(c2)) from db.t1"
)
tdSql
.
error
(
"select floor(last_row(c3)) from db.t1"
)
tdSql
.
error
(
"select floor(last_row(c4)) from db.t1"
)
tdSql
.
error
(
"select floor(last_row(c5)) from db.t1"
)
tdSql
.
error
(
"select floor(last_row(c7)) from db.t1"
)
tdSql
.
error
(
"select floor(last_row(c8)) from db.t1"
)
tdSql
.
error
(
"select first(floor(c2)) from db.t1"
)
tdSql
.
error
(
"select first(floor(c3)) from db.t1"
)
tdSql
.
error
(
"select first(floor(c4)) from db.t1"
)
tdSql
.
error
(
"select first(floor(c5)) from db.t1"
)
tdSql
.
error
(
"select first(floor(c7)) from db.t1"
)
tdSql
.
error
(
"select first(floor(c8)) from db.t1"
)
tdSql
.
error
(
"select floor(first(c2)) from db.t1"
)
tdSql
.
error
(
"select floor(first(c3)) from db.t1"
)
tdSql
.
error
(
"select floor(first(c4)) from db.t1"
)
tdSql
.
error
(
"select floor(first(c5)) from db.t1"
)
tdSql
.
error
(
"select floor(first(c7)) from db.t1"
)
tdSql
.
error
(
"select floor(first(c8)) from db.t1"
)
tdSql
.
error
(
"select diff(floor(c2)) from db.t1"
)
tdSql
.
error
(
"select diff(floor(c3)) from db.t1"
)
tdSql
.
error
(
"select diff(floor(c4)) from db.t1"
)
tdSql
.
error
(
"select diff(floor(c5)) from db.t1"
)
tdSql
.
error
(
"select diff(floor(c7)) from db.t1"
)
tdSql
.
error
(
"select diff(floor(c8)) from db.t1"
)
tdSql
.
error
(
"select floor(diff(c2)) from db.t1"
)
tdSql
.
error
(
"select floor(diff(c3)) from db.t1"
)
tdSql
.
error
(
"select floor(diff(c4)) from db.t1"
)
tdSql
.
error
(
"select floor(diff(c5)) from db.t1"
)
tdSql
.
error
(
"select floor(diff(c7)) from db.t1"
)
tdSql
.
error
(
"select floor(diff(c8)) from db.t1"
)
tdSql
.
error
(
"select percentile(floor(c2), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(floor(c3), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(floor(c4), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(floor(c5), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(floor(c7), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(floor(c8), 0) from db.t1"
)
tdSql
.
error
(
"select floor(percentile(c2, 0)) from db.t1"
)
tdSql
.
error
(
"select floor(percentile(c3, 0)) from db.t1"
)
tdSql
.
error
(
"select floor(percentile(c4, 0)) from db.t1"
)
tdSql
.
error
(
"select floor(percentile(c5, 0)) from db.t1"
)
tdSql
.
error
(
"select floor(percentile(c7, 0)) from db.t1"
)
tdSql
.
error
(
"select floor(percentile(c8, 0)) from db.t1"
)
tdSql
.
error
(
"select derivate(floor(c2),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(floor(c3),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(floor(c4),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(floor(c5),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(floor(c7),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(floor(c8),1s, 1) from db.t1"
)
tdSql
.
error
(
"select floor(derivate(c2,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select floor(derivate(c3,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select floor(derivate(c4,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select floor(derivate(c5,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select floor(derivate(c7,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select floor(derivate(c8,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select leastsquares(floor(c2),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(floor(c3),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(floor(c4),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(floor(c5),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(floor(c7),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(floor(c8),1, 1) from db.t1"
)
tdSql
.
error
(
"select floor(leastsquares(c2,1, 1)) from db.t1"
)
tdSql
.
error
(
"select floor(leastsquares(c3,1, 1)) from db.t1"
)
tdSql
.
error
(
"select floor(leastsquares(c4,1, 1)) from db.t1"
)
tdSql
.
error
(
"select floor(leastsquares(c5,1, 1)) from db.t1"
)
tdSql
.
error
(
"select floor(leastsquares(c7,1, 1)) from db.t1"
)
tdSql
.
error
(
"select floor(leastsquares(c8,1, 1)) from db.t1"
)
tdSql
.
error
(
"select count(floor(c2)) from db.t1"
)
tdSql
.
error
(
"select count(floor(c3)) from db.t1"
)
tdSql
.
error
(
"select count(floor(c4)) from db.t1"
)
tdSql
.
error
(
"select count(floor(c5)) from db.t1"
)
tdSql
.
error
(
"select count(floor(c7)) from db.t1"
)
tdSql
.
error
(
"select count(floor(c8)) from db.t1"
)
tdSql
.
error
(
"select floor(count(c2)) from db.t1"
)
tdSql
.
error
(
"select floor(count(c3)) from db.t1"
)
tdSql
.
error
(
"select floor(count(c4)) from db.t1"
)
tdSql
.
error
(
"select floor(count(c5)) from db.t1"
)
tdSql
.
error
(
"select floor(count(c7)) from db.t1"
)
tdSql
.
error
(
"select floor(count(c8)) from db.t1"
)
tdSql
.
error
(
"select twa(floor(c2)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(floor(c3)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(floor(c4)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(floor(c5)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(floor(c7)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(floor(c8)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select floor(twa(c2)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select floor(twa(c3)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select floor(twa(c4)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select floor(twa(c5)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select floor(twa(c7)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select floor(twa(c8)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select stddev(floor(c2)) from db.t1"
)
tdSql
.
error
(
"select stddev(floor(c3)) from db.t1"
)
tdSql
.
error
(
"select stddev(floor(c4)) from db.t1"
)
tdSql
.
error
(
"select stddev(floor(c5)) from db.t1"
)
tdSql
.
error
(
"select stddev(floor(c7)) from db.t1"
)
tdSql
.
error
(
"select stddev(floor(c8)) from db.t1"
)
tdSql
.
error
(
"select floor(stddev(c2)) from db.t1"
)
tdSql
.
error
(
"select floor(stddev(c3)) from db.t1"
)
tdSql
.
error
(
"select floor(stddev(c4)) from db.t1"
)
tdSql
.
error
(
"select floor(stddev(c5)) from db.t1"
)
tdSql
.
error
(
"select floor(stddev(c7)) from db.t1"
)
tdSql
.
error
(
"select floor(stddev(c8)) from db.t1"
)
tdSql
.
error
(
"select spread(floor(c2)) from db.t1"
)
tdSql
.
error
(
"select spread(floor(c3)) from db.t1"
)
tdSql
.
error
(
"select spread(floor(c4)) from db.t1"
)
tdSql
.
error
(
"select spread(floor(c5)) from db.t1"
)
tdSql
.
error
(
"select spread(floor(c7)) from db.t1"
)
tdSql
.
error
(
"select spread(floor(c8)) from db.t1"
)
tdSql
.
error
(
"select floor(spread(c2)) from db.t1"
)
tdSql
.
error
(
"select floor(spread(c3)) from db.t1"
)
tdSql
.
error
(
"select floor(spread(c4)) from db.t1"
)
tdSql
.
error
(
"select floor(spread(c5)) from db.t1"
)
tdSql
.
error
(
"select floor(spread(c7)) from db.t1"
)
tdSql
.
error
(
"select floor(spread(c8)) from db.t1"
)
tdSql
.
error
(
"select floor(c2 + 1) from db.t1"
)
tdSql
.
error
(
"select floor(c3 + 1) from db.t1"
)
tdSql
.
error
(
"select floor(c4 + 1) from db.t1"
)
tdSql
.
error
(
"select floor(c5 + 1) from db.t1"
)
tdSql
.
error
(
"select floor(c7 + 1) from db.t1"
)
tdSql
.
error
(
"select floor(c8 + 1) from db.t1"
)
tdSql
.
error
(
"select bottom(floor(c2), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(floor(c3), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(floor(c4), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(floor(c5), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(floor(c7), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(floor(c8), 2) from db.t1"
)
tdSql
.
error
(
"select floor(bottom(c2, 2)) from db.t1"
)
tdSql
.
error
(
"select floor(bottom(c3, 2)) from db.t1"
)
tdSql
.
error
(
"select floor(bottom(c4, 2)) from db.t1"
)
tdSql
.
error
(
"select floor(bottom(c5, 2)) from db.t1"
)
tdSql
.
error
(
"select floor(bottom(c7, 2)) from db.t1"
)
tdSql
.
error
(
"select floor(bottom(c8, 2)) from db.t1"
)
tdSql
.
error
(
"select floor(c2) + floor(c3) from db.t1"
)
tdSql
.
error
(
"select floor(c3) + floor(c4) from db.t1"
)
tdSql
.
error
(
"select floor(c4) + floor(c5) from db.t1"
)
tdSql
.
error
(
"select floor(c5) + floor(c7) from db.t1"
)
tdSql
.
error
(
"select floor(c7) + floor(c8) from db.t1"
)
tdSql
.
error
(
"select floor(c8) + floor(c2) from db.t1"
)
tdSql
.
error
(
"select floor(c2 + c3) from db.t1"
)
tdSql
.
error
(
"select floor(c3 + c4) from db.t1"
)
tdSql
.
error
(
"select floor(c4 + c5) from db.t1"
)
tdSql
.
error
(
"select floor(c5 + c7) from db.t1"
)
tdSql
.
error
(
"select floor(c7 + c8) from db.t1"
)
tdSql
.
error
(
"select floor(c8 + c2) from db.t1"
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
\ No newline at end of file
tests/pytest/functions/function_round.py
0 → 100644
浏览文件 @
f359ff2c
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
sys
import
taos
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
import
numpy
as
np
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
def
run
(
self
):
tdSql
.
prepare
()
tdSql
.
execute
(
"create stable super (ts timestamp, c1 timestamp, c2 int, c3 bigint, c4 float, c5 double, c6 binary(8), c7 smallint, c8 tinyint, c9 bool, c10 nchar(8)) tags (t1 int, t2 bigint, t3 float, t4 double, t5 binary(8), t6 smallint, t7 tinyint, t8 bool, t9 nchar(8))"
)
tdSql
.
execute
(
"create table t1 using super tags (1, 8, 1.0, 1.0, 'abcdefgh', 1, 1, 1, 'abcdeffh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000000, 1537146000000, 1, 1, 1.0, 1.0, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000001, 1537146000000, 1, 1, 1.1, 1.1, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000002, 1537146000000, 1, 1, 1.2, 1.2, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000003, 1537146000000, 1, 1, 1.3, 1.3, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000004, 1537146000000, 1, 1, 1.4, 1.4, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000005, 1537146000000, 1, 1, 1.5, 1.5, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000006, 1537146000000, 1, 1, 1.6, 1.6, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000007, 1537146000000, 1, 1, 1.7, 1.7, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000008, 1537146000000, 1, 1, 1.8, 1.8, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000009, 1537146000000, 1, 1, 1.9, 1.9, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000010, 1537146000000, 1, 1, 1.5444444, 1.544444, 'abcdefgh',1,1,1,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000011, 1537146000000, -1, -1, -1.0, -1.0, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000012, 1537146000000, -1, -1, -1.1, -1.1, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000013, 1537146000000, -1, -1, -1.2, -1.2, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000014, 1537146000000, -1, -1, -1.3, -1.3, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000015, 1537146000000, -1, -1, -1.4, -1.4, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000016, 1537146000000, -1, -1, -1.5, -1.5, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000017, 1537146000000, -1, -1, -1.6, -1.6, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000018, 1537146000000, -1, -1, -1.7, -1.7, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000019, 1537146000000, -1, -1, -1.8, -1.8, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000020, 1537146000000, -1, -1, -1.9, -1.9, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
tdSql
.
execute
(
"insert into t1 values (1537146000021, 1537146000000, -1, -1, -1.5444444, -1.544444, 'abcdefgh',-1,-1,0,'abcdefgh')"
)
# tags does not support round
# for stable
tdSql
.
error
(
"select round(t1) from db.super"
)
tdSql
.
error
(
"select round(t2) from db.super"
)
tdSql
.
error
(
"select round(t3) from db.super"
)
tdSql
.
error
(
"select round(t4) from db.super"
)
tdSql
.
error
(
"select round(t5) from db.super"
)
tdSql
.
error
(
"select round(t6) from db.super"
)
tdSql
.
error
(
"select round(t7) from db.super"
)
tdSql
.
error
(
"select round(t8) from db.super"
)
tdSql
.
error
(
"select round(t9) from db.super"
)
# for table
tdSql
.
error
(
"select round(t1) from db.t1"
)
tdSql
.
error
(
"select round(t2) from db.t1"
)
tdSql
.
error
(
"select round(t3) from db.t1"
)
tdSql
.
error
(
"select round(t4) from db.t1"
)
tdSql
.
error
(
"select round(t5) from db.t1"
)
tdSql
.
error
(
"select round(t6) from db.t1"
)
tdSql
.
error
(
"select round(t7) from db.t1"
)
tdSql
.
error
(
"select round(t8) from db.t1"
)
tdSql
.
error
(
"select round(t9) from db.t1"
)
# check support columns
# for stable
tdSql
.
error
(
"select round(ts) from db.super"
)
tdSql
.
error
(
"select round(c1) from db.super"
)
tdSql
.
query
(
"select round(c2) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select round(c3) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select round(c4) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
0
<=
i
<=
4
:
tdSql
.
checkData
(
i
,
0
,
1
)
if
4
<
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
2
)
if
11
<=
i
<=
15
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
if
i
>
15
:
tdSql
.
checkData
(
i
,
0
,
-
2
)
tdSql
.
query
(
"select round(c5) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
0
<=
i
<=
4
:
tdSql
.
checkData
(
i
,
0
,
1
)
if
4
<
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
2
)
if
11
<=
i
<=
15
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
if
i
>
15
:
tdSql
.
checkData
(
i
,
0
,
-
2
)
tdSql
.
error
(
"select round(c6) from db.super"
)
tdSql
.
query
(
"select round(c7) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select round(c8) from db.super"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
error
(
"select round(c9) from db.super"
)
tdSql
.
error
(
"select round(c10) from db.super"
)
# for table
tdSql
.
error
(
"select round(ts) from db.t1"
)
tdSql
.
error
(
"select round(c1) from db.t1"
)
tdSql
.
query
(
"select round(c2) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select round(c3) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select round(c4) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
0
<=
i
<=
4
:
tdSql
.
checkData
(
i
,
0
,
1
)
if
4
<
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
2
)
if
11
<=
i
<=
15
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
if
i
>
15
:
tdSql
.
checkData
(
i
,
0
,
-
2
)
tdSql
.
query
(
"select round(c5) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
0
<=
i
<=
4
:
tdSql
.
checkData
(
i
,
0
,
1
)
if
4
<
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
2
)
if
11
<=
i
<=
15
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
if
i
>
15
:
tdSql
.
checkData
(
i
,
0
,
-
2
)
tdSql
.
error
(
"select round(c6) from db.t1"
)
tdSql
.
query
(
"select round(c7) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
query
(
"select round(c8) from db.t1"
)
tdSql
.
checkRows
(
22
)
for
i
in
range
(
22
):
if
i
<
11
:
tdSql
.
checkData
(
i
,
0
,
1
)
else
:
tdSql
.
checkData
(
i
,
0
,
-
1
)
tdSql
.
error
(
"select round(c9) from db.t1"
)
tdSql
.
error
(
"select round(c10) from db.t1"
)
# does not support aggregation
# for super table
tdSql
.
error
(
"select max(round(c2)) from db.super"
)
tdSql
.
error
(
"select max(round(c3)) from db.super"
)
tdSql
.
error
(
"select max(round(c4)) from db.super"
)
tdSql
.
error
(
"select max(round(c5)) from db.super"
)
tdSql
.
error
(
"select max(round(c7)) from db.super"
)
tdSql
.
error
(
"select max(round(c8)) from db.super"
)
tdSql
.
error
(
"select round(max(c2)) from db.super"
)
tdSql
.
error
(
"select round(max(c3)) from db.super"
)
tdSql
.
error
(
"select round(max(c4)) from db.super"
)
tdSql
.
error
(
"select round(max(c5)) from db.super"
)
tdSql
.
error
(
"select round(max(c7)) from db.super"
)
tdSql
.
error
(
"select round(max(c8)) from db.super"
)
tdSql
.
error
(
"select min(round(c2)) from db.super"
)
tdSql
.
error
(
"select min(round(c3)) from db.super"
)
tdSql
.
error
(
"select min(round(c4)) from db.super"
)
tdSql
.
error
(
"select min(round(c5)) from db.super"
)
tdSql
.
error
(
"select min(round(c7)) from db.super"
)
tdSql
.
error
(
"select min(round(c8)) from db.super"
)
tdSql
.
error
(
"select round(min(c2)) from db.super"
)
tdSql
.
error
(
"select round(min(c3)) from db.super"
)
tdSql
.
error
(
"select round(min(c4)) from db.super"
)
tdSql
.
error
(
"select round(min(c5)) from db.super"
)
tdSql
.
error
(
"select round(min(c7)) from db.super"
)
tdSql
.
error
(
"select round(min(c8)) from db.super"
)
tdSql
.
error
(
"select avg(round(c2)) from db.super"
)
tdSql
.
error
(
"select avg(round(c3)) from db.super"
)
tdSql
.
error
(
"select avg(round(c4)) from db.super"
)
tdSql
.
error
(
"select avg(round(c5)) from db.super"
)
tdSql
.
error
(
"select avg(round(c7)) from db.super"
)
tdSql
.
error
(
"select avg(round(c8)) from db.super"
)
tdSql
.
error
(
"select round(avg(c2)) from db.super"
)
tdSql
.
error
(
"select round(avg(c3)) from db.super"
)
tdSql
.
error
(
"select round(avg(c4)) from db.super"
)
tdSql
.
error
(
"select round(avg(c5)) from db.super"
)
tdSql
.
error
(
"select round(avg(c7)) from db.super"
)
tdSql
.
error
(
"select round(avg(c8)) from db.super"
)
tdSql
.
error
(
"select last(round(c2)) from db.super"
)
tdSql
.
error
(
"select last(round(c3)) from db.super"
)
tdSql
.
error
(
"select last(round(c4)) from db.super"
)
tdSql
.
error
(
"select last(round(c5)) from db.super"
)
tdSql
.
error
(
"select last(round(c7)) from db.super"
)
tdSql
.
error
(
"select last(round(c8)) from db.super"
)
tdSql
.
error
(
"select round(last(c2)) from db.super"
)
tdSql
.
error
(
"select round(last(c3)) from db.super"
)
tdSql
.
error
(
"select round(last(c4)) from db.super"
)
tdSql
.
error
(
"select round(last(c5)) from db.super"
)
tdSql
.
error
(
"select round(last(c7)) from db.super"
)
tdSql
.
error
(
"select round(last(c8)) from db.super"
)
tdSql
.
error
(
"select last_row(round(c2)) from db.super"
)
tdSql
.
error
(
"select last_row(round(c3)) from db.super"
)
tdSql
.
error
(
"select last_row(round(c4)) from db.super"
)
tdSql
.
error
(
"select last_row(round(c5)) from db.super"
)
tdSql
.
error
(
"select last_row(round(c7)) from db.super"
)
tdSql
.
error
(
"select last_row(round(c8)) from db.super"
)
tdSql
.
error
(
"select round(last_row(c2)) from db.super"
)
tdSql
.
error
(
"select round(last_row(c3)) from db.super"
)
tdSql
.
error
(
"select round(last_row(c4)) from db.super"
)
tdSql
.
error
(
"select round(last_row(c5)) from db.super"
)
tdSql
.
error
(
"select round(last_row(c7)) from db.super"
)
tdSql
.
error
(
"select round(last_row(c8)) from db.super"
)
tdSql
.
error
(
"select first(round(c2)) from db.super"
)
tdSql
.
error
(
"select first(round(c3)) from db.super"
)
tdSql
.
error
(
"select first(round(c4)) from db.super"
)
tdSql
.
error
(
"select first(round(c5)) from db.super"
)
tdSql
.
error
(
"select first(round(c7)) from db.super"
)
tdSql
.
error
(
"select first(round(c8)) from db.super"
)
tdSql
.
error
(
"select round(first(c2)) from db.super"
)
tdSql
.
error
(
"select round(first(c3)) from db.super"
)
tdSql
.
error
(
"select round(first(c4)) from db.super"
)
tdSql
.
error
(
"select round(first(c5)) from db.super"
)
tdSql
.
error
(
"select round(first(c7)) from db.super"
)
tdSql
.
error
(
"select round(first(c8)) from db.super"
)
tdSql
.
error
(
"select diff(round(c2)) from db.super"
)
tdSql
.
error
(
"select diff(round(c3)) from db.super"
)
tdSql
.
error
(
"select diff(round(c4)) from db.super"
)
tdSql
.
error
(
"select diff(round(c5)) from db.super"
)
tdSql
.
error
(
"select diff(round(c7)) from db.super"
)
tdSql
.
error
(
"select diff(round(c8)) from db.super"
)
tdSql
.
error
(
"select round(diff(c2)) from db.super"
)
tdSql
.
error
(
"select round(diff(c3)) from db.super"
)
tdSql
.
error
(
"select round(diff(c4)) from db.super"
)
tdSql
.
error
(
"select round(diff(c5)) from db.super"
)
tdSql
.
error
(
"select round(diff(c7)) from db.super"
)
tdSql
.
error
(
"select round(diff(c8)) from db.super"
)
tdSql
.
error
(
"select percentile(round(c2), 0) from db.super"
)
tdSql
.
error
(
"select percentile(round(c3), 0) from db.super"
)
tdSql
.
error
(
"select percentile(round(c4), 0) from db.super"
)
tdSql
.
error
(
"select percentile(round(c5), 0) from db.super"
)
tdSql
.
error
(
"select percentile(round(c7), 0) from db.super"
)
tdSql
.
error
(
"select percentile(round(c8), 0) from db.super"
)
tdSql
.
error
(
"select round(percentile(c2, 0)) from db.super"
)
tdSql
.
error
(
"select round(percentile(c3, 0)) from db.super"
)
tdSql
.
error
(
"select round(percentile(c4, 0)) from db.super"
)
tdSql
.
error
(
"select round(percentile(c5, 0)) from db.super"
)
tdSql
.
error
(
"select round(percentile(c7, 0)) from db.super"
)
tdSql
.
error
(
"select round(percentile(c8, 0)) from db.super"
)
tdSql
.
error
(
"select derivate(round(c2),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(round(c3),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(round(c4),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(round(c5),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(round(c7),1s, 1) from db.super"
)
tdSql
.
error
(
"select derivate(round(c8),1s, 1) from db.super"
)
tdSql
.
error
(
"select round(derivate(c2,1s, 1)) from db.super"
)
tdSql
.
error
(
"select round(derivate(c3,1s, 1)) from db.super"
)
tdSql
.
error
(
"select round(derivate(c4,1s, 1)) from db.super"
)
tdSql
.
error
(
"select round(derivate(c5,1s, 1)) from db.super"
)
tdSql
.
error
(
"select round(derivate(c7,1s, 1)) from db.super"
)
tdSql
.
error
(
"select round(derivate(c8,1s, 1)) from db.super"
)
tdSql
.
error
(
"select leastsquares(round(c2),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(round(c3),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(round(c4),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(round(c5),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(round(c7),1, 1) from db.super"
)
tdSql
.
error
(
"select leastsquares(round(c8),1, 1) from db.super"
)
tdSql
.
error
(
"select round(leastsquares(c2,1, 1)) from db.super"
)
tdSql
.
error
(
"select round(leastsquares(c3,1, 1)) from db.super"
)
tdSql
.
error
(
"select round(leastsquares(c4,1, 1)) from db.super"
)
tdSql
.
error
(
"select round(leastsquares(c5,1, 1)) from db.super"
)
tdSql
.
error
(
"select round(leastsquares(c7,1, 1)) from db.super"
)
tdSql
.
error
(
"select round(leastsquares(c8,1, 1)) from db.super"
)
tdSql
.
error
(
"select count(round(c2)) from db.super"
)
tdSql
.
error
(
"select count(round(c3)) from db.super"
)
tdSql
.
error
(
"select count(round(c4)) from db.super"
)
tdSql
.
error
(
"select count(round(c5)) from db.super"
)
tdSql
.
error
(
"select count(round(c7)) from db.super"
)
tdSql
.
error
(
"select count(round(c8)) from db.super"
)
tdSql
.
error
(
"select round(count(c2)) from db.super"
)
tdSql
.
error
(
"select round(count(c3)) from db.super"
)
tdSql
.
error
(
"select round(count(c4)) from db.super"
)
tdSql
.
error
(
"select round(count(c5)) from db.super"
)
tdSql
.
error
(
"select round(count(c7)) from db.super"
)
tdSql
.
error
(
"select round(count(c8)) from db.super"
)
tdSql
.
error
(
"select twa(round(c2)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(round(c3)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(round(c4)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(round(c5)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(round(c7)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(round(c8)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select round(twa(c2)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select round(twa(c3)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select round(twa(c4)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select round(twa(c5)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select round(twa(c7)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select round(twa(c8)) from db.super where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select stddev(round(c2)) from db.super"
)
tdSql
.
error
(
"select stddev(round(c3)) from db.super"
)
tdSql
.
error
(
"select stddev(round(c4)) from db.super"
)
tdSql
.
error
(
"select stddev(round(c5)) from db.super"
)
tdSql
.
error
(
"select stddev(round(c7)) from db.super"
)
tdSql
.
error
(
"select stddev(round(c8)) from db.super"
)
tdSql
.
error
(
"select round(stddev(c2)) from db.super"
)
tdSql
.
error
(
"select round(stddev(c3)) from db.super"
)
tdSql
.
error
(
"select round(stddev(c4)) from db.super"
)
tdSql
.
error
(
"select round(stddev(c5)) from db.super"
)
tdSql
.
error
(
"select round(stddev(c7)) from db.super"
)
tdSql
.
error
(
"select round(stddev(c8)) from db.super"
)
tdSql
.
error
(
"select spread(round(c2)) from db.super"
)
tdSql
.
error
(
"select spread(round(c3)) from db.super"
)
tdSql
.
error
(
"select spread(round(c4)) from db.super"
)
tdSql
.
error
(
"select spread(round(c5)) from db.super"
)
tdSql
.
error
(
"select spread(round(c7)) from db.super"
)
tdSql
.
error
(
"select spread(round(c8)) from db.super"
)
tdSql
.
error
(
"select round(spread(c2)) from db.super"
)
tdSql
.
error
(
"select round(spread(c3)) from db.super"
)
tdSql
.
error
(
"select round(spread(c4)) from db.super"
)
tdSql
.
error
(
"select round(spread(c5)) from db.super"
)
tdSql
.
error
(
"select round(spread(c7)) from db.super"
)
tdSql
.
error
(
"select round(spread(c8)) from db.super"
)
tdSql
.
error
(
"select round(c2 + 1) from db.super"
)
tdSql
.
error
(
"select round(c3 + 1) from db.super"
)
tdSql
.
error
(
"select round(c4 + 1) from db.super"
)
tdSql
.
error
(
"select round(c5 + 1) from db.super"
)
tdSql
.
error
(
"select round(c7 + 1) from db.super"
)
tdSql
.
error
(
"select round(c8 + 1) from db.super"
)
tdSql
.
error
(
"select bottom(round(c2), 2) from db.super"
)
tdSql
.
error
(
"select bottom(round(c3), 2) from db.super"
)
tdSql
.
error
(
"select bottom(round(c4), 2) from db.super"
)
tdSql
.
error
(
"select bottom(round(c5), 2) from db.super"
)
tdSql
.
error
(
"select bottom(round(c7), 2) from db.super"
)
tdSql
.
error
(
"select bottom(round(c8), 2) from db.super"
)
tdSql
.
error
(
"select round(bottom(c2, 2)) from db.super"
)
tdSql
.
error
(
"select round(bottom(c3, 2)) from db.super"
)
tdSql
.
error
(
"select round(bottom(c4, 2)) from db.super"
)
tdSql
.
error
(
"select round(bottom(c5, 2)) from db.super"
)
tdSql
.
error
(
"select round(bottom(c7, 2)) from db.super"
)
tdSql
.
error
(
"select round(bottom(c8, 2)) from db.super"
)
tdSql
.
error
(
"select round(c2) + round(c3) from db.super"
)
tdSql
.
error
(
"select round(c3) + round(c4) from db.super"
)
tdSql
.
error
(
"select round(c4) + round(c5) from db.super"
)
tdSql
.
error
(
"select round(c5) + round(c7) from db.super"
)
tdSql
.
error
(
"select round(c7) + round(c8) from db.super"
)
tdSql
.
error
(
"select round(c8) + round(c2) from db.super"
)
tdSql
.
error
(
"select round(c2 + c3) from db.super"
)
tdSql
.
error
(
"select round(c3 + c4) from db.super"
)
tdSql
.
error
(
"select round(c4 + c5) from db.super"
)
tdSql
.
error
(
"select round(c5 + c7) from db.super"
)
tdSql
.
error
(
"select round(c7 + c8) from db.super"
)
tdSql
.
error
(
"select round(c8 + c2) from db.super"
)
# for table
tdSql
.
error
(
"select max(round(c2)) from db.t1"
)
tdSql
.
error
(
"select max(round(c3)) from db.t1"
)
tdSql
.
error
(
"select max(round(c4)) from db.t1"
)
tdSql
.
error
(
"select max(round(c5)) from db.t1"
)
tdSql
.
error
(
"select max(round(c7)) from db.t1"
)
tdSql
.
error
(
"select max(round(c8)) from db.t1"
)
tdSql
.
error
(
"select round(max(c2)) from db.t1"
)
tdSql
.
error
(
"select round(max(c3)) from db.t1"
)
tdSql
.
error
(
"select round(max(c4)) from db.t1"
)
tdSql
.
error
(
"select round(max(c5)) from db.t1"
)
tdSql
.
error
(
"select round(max(c7)) from db.t1"
)
tdSql
.
error
(
"select round(max(c8)) from db.t1"
)
tdSql
.
error
(
"select min(round(c2)) from db.t1"
)
tdSql
.
error
(
"select min(round(c3)) from db.t1"
)
tdSql
.
error
(
"select min(round(c4)) from db.t1"
)
tdSql
.
error
(
"select min(round(c5)) from db.t1"
)
tdSql
.
error
(
"select min(round(c7)) from db.t1"
)
tdSql
.
error
(
"select min(round(c8)) from db.t1"
)
tdSql
.
error
(
"select round(min(c2)) from db.t1"
)
tdSql
.
error
(
"select round(min(c3)) from db.t1"
)
tdSql
.
error
(
"select round(min(c4)) from db.t1"
)
tdSql
.
error
(
"select round(min(c5)) from db.t1"
)
tdSql
.
error
(
"select round(min(c7)) from db.t1"
)
tdSql
.
error
(
"select round(min(c8)) from db.t1"
)
tdSql
.
error
(
"select avg(round(c2)) from db.t1"
)
tdSql
.
error
(
"select avg(round(c3)) from db.t1"
)
tdSql
.
error
(
"select avg(round(c4)) from db.t1"
)
tdSql
.
error
(
"select avg(round(c5)) from db.t1"
)
tdSql
.
error
(
"select avg(round(c7)) from db.t1"
)
tdSql
.
error
(
"select avg(round(c8)) from db.t1"
)
tdSql
.
error
(
"select round(avg(c2)) from db.t1"
)
tdSql
.
error
(
"select round(avg(c3)) from db.t1"
)
tdSql
.
error
(
"select round(avg(c4)) from db.t1"
)
tdSql
.
error
(
"select round(avg(c5)) from db.t1"
)
tdSql
.
error
(
"select round(avg(c7)) from db.t1"
)
tdSql
.
error
(
"select round(avg(c8)) from db.t1"
)
tdSql
.
error
(
"select last(round(c2)) from db.t1"
)
tdSql
.
error
(
"select last(round(c3)) from db.t1"
)
tdSql
.
error
(
"select last(round(c4)) from db.t1"
)
tdSql
.
error
(
"select last(round(c5)) from db.t1"
)
tdSql
.
error
(
"select last(round(c7)) from db.t1"
)
tdSql
.
error
(
"select last(round(c8)) from db.t1"
)
tdSql
.
error
(
"select round(last(c2)) from db.t1"
)
tdSql
.
error
(
"select round(last(c3)) from db.t1"
)
tdSql
.
error
(
"select round(last(c4)) from db.t1"
)
tdSql
.
error
(
"select round(last(c5)) from db.t1"
)
tdSql
.
error
(
"select round(last(c7)) from db.t1"
)
tdSql
.
error
(
"select round(last(c8)) from db.t1"
)
tdSql
.
error
(
"select last_row(round(c2)) from db.t1"
)
tdSql
.
error
(
"select last_row(round(c3)) from db.t1"
)
tdSql
.
error
(
"select last_row(round(c4)) from db.t1"
)
tdSql
.
error
(
"select last_row(round(c5)) from db.t1"
)
tdSql
.
error
(
"select last_row(round(c7)) from db.t1"
)
tdSql
.
error
(
"select last_row(round(c8)) from db.t1"
)
tdSql
.
error
(
"select round(last_row(c2)) from db.t1"
)
tdSql
.
error
(
"select round(last_row(c3)) from db.t1"
)
tdSql
.
error
(
"select round(last_row(c4)) from db.t1"
)
tdSql
.
error
(
"select round(last_row(c5)) from db.t1"
)
tdSql
.
error
(
"select round(last_row(c7)) from db.t1"
)
tdSql
.
error
(
"select round(last_row(c8)) from db.t1"
)
tdSql
.
error
(
"select first(round(c2)) from db.t1"
)
tdSql
.
error
(
"select first(round(c3)) from db.t1"
)
tdSql
.
error
(
"select first(round(c4)) from db.t1"
)
tdSql
.
error
(
"select first(round(c5)) from db.t1"
)
tdSql
.
error
(
"select first(round(c7)) from db.t1"
)
tdSql
.
error
(
"select first(round(c8)) from db.t1"
)
tdSql
.
error
(
"select round(first(c2)) from db.t1"
)
tdSql
.
error
(
"select round(first(c3)) from db.t1"
)
tdSql
.
error
(
"select round(first(c4)) from db.t1"
)
tdSql
.
error
(
"select round(first(c5)) from db.t1"
)
tdSql
.
error
(
"select round(first(c7)) from db.t1"
)
tdSql
.
error
(
"select round(first(c8)) from db.t1"
)
tdSql
.
error
(
"select diff(round(c2)) from db.t1"
)
tdSql
.
error
(
"select diff(round(c3)) from db.t1"
)
tdSql
.
error
(
"select diff(round(c4)) from db.t1"
)
tdSql
.
error
(
"select diff(round(c5)) from db.t1"
)
tdSql
.
error
(
"select diff(round(c7)) from db.t1"
)
tdSql
.
error
(
"select diff(round(c8)) from db.t1"
)
tdSql
.
error
(
"select round(diff(c2)) from db.t1"
)
tdSql
.
error
(
"select round(diff(c3)) from db.t1"
)
tdSql
.
error
(
"select round(diff(c4)) from db.t1"
)
tdSql
.
error
(
"select round(diff(c5)) from db.t1"
)
tdSql
.
error
(
"select round(diff(c7)) from db.t1"
)
tdSql
.
error
(
"select round(diff(c8)) from db.t1"
)
tdSql
.
error
(
"select percentile(round(c2), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(round(c3), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(round(c4), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(round(c5), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(round(c7), 0) from db.t1"
)
tdSql
.
error
(
"select percentile(round(c8), 0) from db.t1"
)
tdSql
.
error
(
"select round(percentile(c2, 0)) from db.t1"
)
tdSql
.
error
(
"select round(percentile(c3, 0)) from db.t1"
)
tdSql
.
error
(
"select round(percentile(c4, 0)) from db.t1"
)
tdSql
.
error
(
"select round(percentile(c5, 0)) from db.t1"
)
tdSql
.
error
(
"select round(percentile(c7, 0)) from db.t1"
)
tdSql
.
error
(
"select round(percentile(c8, 0)) from db.t1"
)
tdSql
.
error
(
"select derivate(round(c2),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(round(c3),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(round(c4),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(round(c5),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(round(c7),1s, 1) from db.t1"
)
tdSql
.
error
(
"select derivate(round(c8),1s, 1) from db.t1"
)
tdSql
.
error
(
"select round(derivate(c2,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select round(derivate(c3,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select round(derivate(c4,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select round(derivate(c5,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select round(derivate(c7,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select round(derivate(c8,1s, 1)) from db.t1"
)
tdSql
.
error
(
"select leastsquares(round(c2),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(round(c3),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(round(c4),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(round(c5),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(round(c7),1, 1) from db.t1"
)
tdSql
.
error
(
"select leastsquares(round(c8),1, 1) from db.t1"
)
tdSql
.
error
(
"select round(leastsquares(c2,1, 1)) from db.t1"
)
tdSql
.
error
(
"select round(leastsquares(c3,1, 1)) from db.t1"
)
tdSql
.
error
(
"select round(leastsquares(c4,1, 1)) from db.t1"
)
tdSql
.
error
(
"select round(leastsquares(c5,1, 1)) from db.t1"
)
tdSql
.
error
(
"select round(leastsquares(c7,1, 1)) from db.t1"
)
tdSql
.
error
(
"select round(leastsquares(c8,1, 1)) from db.t1"
)
tdSql
.
error
(
"select count(round(c2)) from db.t1"
)
tdSql
.
error
(
"select count(round(c3)) from db.t1"
)
tdSql
.
error
(
"select count(round(c4)) from db.t1"
)
tdSql
.
error
(
"select count(round(c5)) from db.t1"
)
tdSql
.
error
(
"select count(round(c7)) from db.t1"
)
tdSql
.
error
(
"select count(round(c8)) from db.t1"
)
tdSql
.
error
(
"select round(count(c2)) from db.t1"
)
tdSql
.
error
(
"select round(count(c3)) from db.t1"
)
tdSql
.
error
(
"select round(count(c4)) from db.t1"
)
tdSql
.
error
(
"select round(count(c5)) from db.t1"
)
tdSql
.
error
(
"select round(count(c7)) from db.t1"
)
tdSql
.
error
(
"select round(count(c8)) from db.t1"
)
tdSql
.
error
(
"select twa(round(c2)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(round(c3)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(round(c4)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(round(c5)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(round(c7)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select twa(round(c8)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select round(twa(c2)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select round(twa(c3)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select round(twa(c4)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select round(twa(c5)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select round(twa(c7)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select round(twa(c8)) from db.t1 where ts <= 1537146000021 and ts >= 1537146000000"
)
tdSql
.
error
(
"select stddev(round(c2)) from db.t1"
)
tdSql
.
error
(
"select stddev(round(c3)) from db.t1"
)
tdSql
.
error
(
"select stddev(round(c4)) from db.t1"
)
tdSql
.
error
(
"select stddev(round(c5)) from db.t1"
)
tdSql
.
error
(
"select stddev(round(c7)) from db.t1"
)
tdSql
.
error
(
"select stddev(round(c8)) from db.t1"
)
tdSql
.
error
(
"select round(stddev(c2)) from db.t1"
)
tdSql
.
error
(
"select round(stddev(c3)) from db.t1"
)
tdSql
.
error
(
"select round(stddev(c4)) from db.t1"
)
tdSql
.
error
(
"select round(stddev(c5)) from db.t1"
)
tdSql
.
error
(
"select round(stddev(c7)) from db.t1"
)
tdSql
.
error
(
"select round(stddev(c8)) from db.t1"
)
tdSql
.
error
(
"select spread(round(c2)) from db.t1"
)
tdSql
.
error
(
"select spread(round(c3)) from db.t1"
)
tdSql
.
error
(
"select spread(round(c4)) from db.t1"
)
tdSql
.
error
(
"select spread(round(c5)) from db.t1"
)
tdSql
.
error
(
"select spread(round(c7)) from db.t1"
)
tdSql
.
error
(
"select spread(round(c8)) from db.t1"
)
tdSql
.
error
(
"select round(spread(c2)) from db.t1"
)
tdSql
.
error
(
"select round(spread(c3)) from db.t1"
)
tdSql
.
error
(
"select round(spread(c4)) from db.t1"
)
tdSql
.
error
(
"select round(spread(c5)) from db.t1"
)
tdSql
.
error
(
"select round(spread(c7)) from db.t1"
)
tdSql
.
error
(
"select round(spread(c8)) from db.t1"
)
tdSql
.
error
(
"select round(c2 + 1) from db.t1"
)
tdSql
.
error
(
"select round(c3 + 1) from db.t1"
)
tdSql
.
error
(
"select round(c4 + 1) from db.t1"
)
tdSql
.
error
(
"select round(c5 + 1) from db.t1"
)
tdSql
.
error
(
"select round(c7 + 1) from db.t1"
)
tdSql
.
error
(
"select round(c8 + 1) from db.t1"
)
tdSql
.
error
(
"select bottom(round(c2), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(round(c3), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(round(c4), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(round(c5), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(round(c7), 2) from db.t1"
)
tdSql
.
error
(
"select bottom(round(c8), 2) from db.t1"
)
tdSql
.
error
(
"select round(bottom(c2, 2)) from db.t1"
)
tdSql
.
error
(
"select round(bottom(c3, 2)) from db.t1"
)
tdSql
.
error
(
"select round(bottom(c4, 2)) from db.t1"
)
tdSql
.
error
(
"select round(bottom(c5, 2)) from db.t1"
)
tdSql
.
error
(
"select round(bottom(c7, 2)) from db.t1"
)
tdSql
.
error
(
"select round(bottom(c8, 2)) from db.t1"
)
tdSql
.
error
(
"select round(c2) + round(c3) from db.t1"
)
tdSql
.
error
(
"select round(c3) + round(c4) from db.t1"
)
tdSql
.
error
(
"select round(c4) + round(c5) from db.t1"
)
tdSql
.
error
(
"select round(c5) + round(c7) from db.t1"
)
tdSql
.
error
(
"select round(c7) + round(c8) from db.t1"
)
tdSql
.
error
(
"select round(c8) + round(c2) from db.t1"
)
tdSql
.
error
(
"select round(c2 + c3) from db.t1"
)
tdSql
.
error
(
"select round(c3 + c4) from db.t1"
)
tdSql
.
error
(
"select round(c4 + c5) from db.t1"
)
tdSql
.
error
(
"select round(c5 + c7) from db.t1"
)
tdSql
.
error
(
"select round(c7 + c8) from db.t1"
)
tdSql
.
error
(
"select round(c8 + c2) from db.t1"
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录