Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
81a846ed
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看板
提交
81a846ed
编写于
11月 17, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add test case and modify error message
上级
a713d367
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
107 addition
and
1 deletion
+107
-1
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+1
-1
tests/script/fullGeneralSuite.sim
tests/script/fullGeneralSuite.sim
+2
-0
tests/script/general/compute/testSuite.sim
tests/script/general/compute/testSuite.sim
+1
-0
tests/script/general/parser/scalar_expression.sim
tests/script/general/parser/scalar_expression.sim
+101
-0
tests/script/regressionSuite.sim
tests/script/regressionSuite.sim
+2
-0
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
81a846ed
...
...
@@ -1892,7 +1892,7 @@ static int32_t handleAggTypeExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t
}
static
int32_t
handleSQLExprItem
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
,
int32_t
exprIndex
,
tSqlExprItem
*
pItem
)
{
const
char
*
msg1
=
"invalid column name, illegal column type,
or columns in arithmetic
expression from two tables"
;
const
char
*
msg1
=
"invalid column name, illegal column type,
illegal function combination or columns in
expression from two tables"
;
SColumnList
columnList
=
{
0
};
int32_t
sqlExprType
=
SQLEXPR_TYPE_UNASSIGNED
;
...
...
tests/script/fullGeneralSuite.sim
浏览文件 @
81a846ed
...
...
@@ -39,6 +39,7 @@ run general/compute/sum.sim
run general/compute/top.sim
run general/compute/block_dist.sim
run general/compute/scalar_pow.sim
run general/compute/scalar_triangle.sim
run general/db/alter_option.sim
run general/db/alter_tables_d2.sim
run general/db/alter_tables_v1.sim
...
...
@@ -140,6 +141,7 @@ run general/parser/groupby.sim
run general/parser/top_groupby.sim
run general/parser/tags_dynamically_specifiy.sim
run general/parser/set_tag_vals.sim
run general/parser/scalar_expression.sim
#unsupport run general/parser/repeatAlter.sim
#unsupport run general/parser/slimit_alter_tags.sim
run general/parser/precision_ns.sim
...
...
tests/script/general/compute/testSuite.sim
浏览文件 @
81a846ed
...
...
@@ -21,3 +21,4 @@ run general/compute/sum.sim
run general/compute/top.sim
run general/compute/block_dist.sim
run general/compute/scalar_pow.sim
run general/compute/scalar_triangle.sim
tests/script/general/parser/scalar_expression.sim
0 → 100644
浏览文件 @
81a846ed
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 500
sql connect
$dbPrefix = db
$tbPrefix = ct
$mtPrefix = st
$tbNum = 2
$rowNum = 50
print =============== step1 create stable/table
$i = 0
$db = $dbPrefix . $i
$mt = $mtPrefix . $i
sql drop database $db -x step1
step1:
sql create database $db
sql use $db
sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 nchar(5), c9 binary(10)) TAGS (tgcol int)
$i = 0
while $i < $tbNum
$tb = $tbPrefix . $i
sql create table $tb using $mt tags( $i )
$x = 0
$y = 0.25
while $x < $rowNum
$cc = $x * 60000
$ms = 1601481600000 + $cc
sql insert into $tb values ($ms , $x , $y , $x , $x , $x , $y , $x , $x , $x )
$x = $x + 1
$y = $y + 1
endw
$i = $i + 1
endw
print ================= step2
$stb = $mtPrefix . 0
$tb = $tbPrefix . 0
print execute sql select floor(3.0)+ceil(4.0) from $tb
sql select floor(3.0)+ceil(4.0) from $tb
if $rows != 50 then
return -1
endi
if $data00 != 7.000000000 then
return -1
endi
if $data10 != 7.000000000 then
return -1
endi
if $data20 != 7.000000000 then
return -1
endi
if $data30 != 7.000000000 then
return -1
endi
if $data40 != 7.000000000 then
return -1
endi
if $data50 != 7.000000000 then
return -1
endi
if $data60 != 7.000000000 then
return -1
endi
if $data70 != 7.000000000 then
return -1
endi
if $data80 != 7.000000000 then
return -1
endi
if $data90 != 7.000000000 then
return -1
endi
print execute sql select sum(c1)+3.0+4.0 from $stb
sql select sum(c1)+3.0+4.0 from $stb
if $rows != 1 then
return -1
endi
if $data00 != 2457.000000000 then
return -1
endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
tests/script/regressionSuite.sim
浏览文件 @
81a846ed
...
...
@@ -39,6 +39,7 @@ run general/compute/sum.sim
run general/compute/top.sim
run general/compute/block_dist.sim
run general/compute/scalar_pow.sim
run general/compute/scalar_triangle.sim
run general/db/alter_option.sim
run general/db/alter_tables_d2.sim
run general/db/alter_tables_v1.sim
...
...
@@ -141,6 +142,7 @@ run general/parser/tags_dynamically_specifiy.sim
run general/parser/set_tag_vals.sim
run general/parser/repeatAlter.sim
run general/parser/precision_ns.sim
run general/parser/scalar_expression.sim
##unsupport run general/parser/slimit_alter_tags.sim
run general/stable/disk.sim
run general/stable/dnode3.sim
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录