Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f62b26c8
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看板
提交
f62b26c8
编写于
4月 27, 2022
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' into feature/TD-14481-3.0
上级
05a9af5c
6e591748
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
53 addition
and
17 deletion
+53
-17
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+7
-3
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+1
-0
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+2
-2
source/libs/scalar/src/sclfunc.c
source/libs/scalar/src/sclfunc.c
+12
-2
tests/system-test/0-others/taosShell.py
tests/system-test/0-others/taosShell.py
+28
-10
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+3
-0
未找到文件。
source/common/src/tdatablock.c
浏览文件 @
f62b26c8
...
...
@@ -225,12 +225,16 @@ int32_t colDataMergeCol(SColumnInfoData* pColumnInfoData, uint32_t numOfRow1, co
// Handle the bitmap
char
*
p
=
taosMemoryRealloc
(
pColumnInfoData
->
varmeta
.
offset
,
sizeof
(
int32_t
)
*
(
numOfRow1
+
numOfRow2
));
if
(
p
==
NULL
)
{
// TODO
return
TSDB_CODE_OUT_OF_MEMORY
;
}
pColumnInfoData
->
varmeta
.
offset
=
(
int32_t
*
)
p
;
for
(
int32_t
i
=
0
;
i
<
numOfRow2
;
++
i
)
{
pColumnInfoData
->
varmeta
.
offset
[
i
+
numOfRow1
]
=
pSource
->
varmeta
.
offset
[
i
]
+
pColumnInfoData
->
varmeta
.
length
;
if
(
pSource
->
varmeta
.
offset
[
i
]
==
-
1
)
{
pColumnInfoData
->
varmeta
.
offset
[
i
+
numOfRow1
]
=
-
1
;
}
else
{
pColumnInfoData
->
varmeta
.
offset
[
i
+
numOfRow1
]
=
pSource
->
varmeta
.
offset
[
i
]
+
pColumnInfoData
->
varmeta
.
length
;
}
}
// copy data
...
...
@@ -239,7 +243,7 @@ int32_t colDataMergeCol(SColumnInfoData* pColumnInfoData, uint32_t numOfRow1, co
if
(
pColumnInfoData
->
varmeta
.
allocLen
<
len
+
oldLen
)
{
char
*
tmp
=
taosMemoryRealloc
(
pColumnInfoData
->
pData
,
len
+
oldLen
);
if
(
tmp
==
NULL
)
{
return
TSDB_CODE_
VND_
OUT_OF_MEMORY
;
return
TSDB_CODE_OUT_OF_MEMORY
;
}
pColumnInfoData
->
pData
=
tmp
;
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
f62b26c8
...
...
@@ -5005,6 +5005,7 @@ static int32_t handleLimitOffset(SOperatorInfo* pOperator, SSDataBlock* pBlock)
return
PROJECT_RETRIEVE_DONE
;
}
// todo optimize performance
// If there are slimit/soffset value exists, multi-round result can not be packed into one group, since the
// they may not belong to the same group the limit/offset value is not valid in this case.
if
(
pRes
->
info
.
rows
>=
pOperator
->
resultInfo
.
threshold
||
pProjectInfo
->
slimit
.
offset
!=
-
1
||
pProjectInfo
->
slimit
.
limit
!=
-
1
)
{
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
f62b26c8
...
...
@@ -548,8 +548,8 @@ static EDealRes translateOperator(STranslateContext* pCxt, SOperatorNode* pOp) {
return
generateDealNodeErrMsg
(
pCxt
,
TSDB_CODE_PAR_WRONG_VALUE_TYPE
,
((
SExprNode
*
)(
pOp
->
pRight
))
->
aliasName
);
}
if
((
TSDB_DATA_TYPE_TIMESTAMP
==
ldt
.
type
&&
TSDB_DATA_TYPE_TIMESTAMP
==
rdt
.
type
)
||
(
TSDB_DATA_TYPE_TIMESTAMP
==
ldt
.
type
&&
IS_VAR_DATA_TYPE
(
rdt
.
type
))
||
(
TSDB_DATA_TYPE_TIMESTAMP
==
rdt
.
type
&&
IS_VAR_DATA_TYPE
(
ldt
.
type
)))
{
(
TSDB_DATA_TYPE_TIMESTAMP
==
ldt
.
type
&&
(
IS_VAR_DATA_TYPE
(
rdt
.
type
)
||
IS_FLOAT_TYPE
(
rdt
.
type
)
))
||
(
TSDB_DATA_TYPE_TIMESTAMP
==
rdt
.
type
&&
(
IS_VAR_DATA_TYPE
(
ldt
.
type
)
||
IS_FLOAT_TYPE
(
ldt
.
type
)
)))
{
return
generateDealNodeErrMsg
(
pCxt
,
TSDB_CODE_PAR_WRONG_VALUE_TYPE
,
((
SExprNode
*
)(
pOp
->
pRight
))
->
aliasName
);
}
...
...
source/libs/scalar/src/sclfunc.c
浏览文件 @
f62b26c8
...
...
@@ -133,7 +133,12 @@ static int32_t doScalarFunctionUnique(SScalarParam *pInput, int32_t inputNum, SS
colDataAppendNULL
(
pOutputData
,
i
);
continue
;
}
out
[
i
]
=
valFn
(
getValueFn
(
pInputData
->
pData
,
i
));
double
result
=
valFn
(
getValueFn
(
pInputData
->
pData
,
i
));
if
(
isinf
(
result
)
||
isnan
(
result
))
{
colDataAppendNULL
(
pOutputData
,
i
);
}
else
{
out
[
i
]
=
result
;
}
}
pOutput
->
numOfRows
=
pInput
->
numOfRows
;
...
...
@@ -162,7 +167,12 @@ static int32_t doScalarFunctionUnique2(SScalarParam *pInput, int32_t inputNum, S
colDataAppendNULL
(
pOutputData
,
i
);
continue
;
}
out
[
i
]
=
valFn
(
getValueFn
[
0
](
pInputData
[
0
]
->
pData
,
i
),
getValueFn
[
1
](
pInputData
[
1
]
->
pData
,
0
));
double
result
=
valFn
(
getValueFn
[
0
](
pInputData
[
0
]
->
pData
,
i
),
getValueFn
[
1
](
pInputData
[
1
]
->
pData
,
0
));
if
(
isinf
(
result
)
||
isnan
(
result
))
{
colDataAppendNULL
(
pOutputData
,
i
);
}
else
{
out
[
i
]
=
result
;
}
}
pOutput
->
numOfRows
=
pInput
->
numOfRows
;
...
...
tests/system-test/0-others/taosShell.py
浏览文件 @
f62b26c8
...
...
@@ -70,11 +70,12 @@ class TDTestCase:
# 'serverPort': 7080, 'firstEp': 'trd02:7080'}
hostname
=
socket
.
gethostname
()
serverPort
=
'7080'
clientCfgDict
=
{
'serverPort'
:
''
,
'firstEp'
:
''
,
'secondEp'
:
''
}
clientCfgDict
[
"serverPort"
]
=
serverPort
clientCfgDict
[
"firstEp"
]
=
hostname
+
':'
+
serverPort
clientCfgDict
[
"secondEp"
]
=
hostname
+
':'
+
serverPort
rpcDebugFlagVal
=
'143'
clientCfgDict
=
{
'serverPort'
:
''
,
'firstEp'
:
''
,
'secondEp'
:
''
,
'rpcDebugFlag'
:
'135'
}
clientCfgDict
[
"serverPort"
]
=
serverPort
clientCfgDict
[
"firstEp"
]
=
hostname
+
':'
+
serverPort
clientCfgDict
[
"secondEp"
]
=
hostname
+
':'
+
serverPort
clientCfgDict
[
"rpcDebugFlag"
]
=
rpcDebugFlagVal
updatecfgDict
=
{
'clientCfg'
:
{},
'serverPort'
:
''
,
'firstEp'
:
''
,
'secondEp'
:
''
}
updatecfgDict
[
"clientCfg"
]
=
clientCfgDict
...
...
@@ -109,8 +110,8 @@ class TDTestCase:
# time.sleep(2)
tdSql
.
query
(
"create user testpy pass 'testpy'"
)
hostname
=
socket
.
gethostname
()
tdLog
.
info
(
"hostname: %s"
%
hostname
)
#
hostname = socket.gethostname()
#
tdLog.info ("hostname: %s" % hostname)
buildPath
=
self
.
getBuildPath
()
if
(
buildPath
==
""
):
...
...
@@ -126,8 +127,9 @@ class TDTestCase:
keyDict
=
{
'h'
:
''
,
'P'
:
'6030'
,
'p'
:
'testpy'
,
'u'
:
'testpy'
,
'a'
:
''
,
'A'
:
''
,
'c'
:
''
,
'C'
:
''
,
's'
:
''
,
'r'
:
''
,
'f'
:
''
,
\
'k'
:
''
,
't'
:
''
,
'n'
:
''
,
'l'
:
'1024'
,
'N'
:
'100'
,
'V'
:
''
,
'd'
:
'db'
,
'w'
:
'30'
,
'-help'
:
''
,
'-usage'
:
''
,
'?'
:
''
}
keyDict
[
'h'
]
=
hostname
keyDict
[
'h'
]
=
self
.
hostname
keyDict
[
'c'
]
=
cfgPath
keyDict
[
'P'
]
=
self
.
serverPort
tdLog
.
printNoPrefix
(
"================================ parameter: -h"
)
newDbName
=
"dbh"
...
...
@@ -312,9 +314,25 @@ class TDTestCase:
if
retCode
!=
"TAOS_OK"
:
tdLog
.
exit
(
"taos -C fail"
)
print
(
"-C return content:
\n
"
,
retVal
)
#print ("-C return content:\n ", retVal)
totalCfgItem
=
{
"firstEp"
:[
''
,
''
,
''
],
}
for
line
in
retVal
.
splitlines
():
strList
=
line
.
split
()
if
(
len
(
strList
)
>
2
):
totalCfgItem
[
strList
[
1
]]
=
strList
#print ("dict content:\n ", totalCfgItem)
firstEp
=
keyDict
[
"h"
]
+
':'
+
keyDict
[
'P'
]
if
(
totalCfgItem
[
"firstEp"
][
2
]
!=
firstEp
)
and
(
totalCfgItem
[
"firstEp"
][
0
]
!=
'cfg_file'
):
tdLog
.
exit
(
"taos -C return firstEp error!"
)
if
(
totalCfgItem
[
"rpcDebugFlag"
][
2
]
!=
self
.
rpcDebugFlagVal
)
and
(
totalCfgItem
[
"rpcDebugFlag"
][
0
]
!=
'cfg_file'
):
tdLog
.
exit
(
"taos -C return rpcDebugFlag error!"
)
count
=
os
.
cpu_count
()
if
(
totalCfgItem
[
"numOfCores"
][
2
]
!=
count
)
and
(
totalCfgItem
[
"numOfCores"
][
0
]
!=
'default'
):
tdLog
.
exit
(
"taos -C return numOfCores error!"
)
def
stop
(
self
):
tdSql
.
close
()
...
...
tests/system-test/fulltest.sh
浏览文件 @
f62b26c8
#!/bin/bash
set
-e
#python3 ./test.py -f 0-others/taosShell.py
#python3 ./test.py -f 2-query/between.py
#python3 ./test.py -f 2-query/distinct.py
python3 ./test.py
-f
2-query/varchar.py
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录