Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
203ea1f9
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
203ea1f9
编写于
11月 27, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(query): fix error
上级
31c2aa89
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
30 addition
and
15 deletion
+30
-15
include/libs/executor/executor.h
include/libs/executor/executor.h
+3
-0
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+0
-4
source/dnode/vnode/src/sma/smaRollup.c
source/dnode/vnode/src/sma/smaRollup.c
+4
-2
source/libs/executor/src/exchangeoperator.c
source/libs/executor/src/exchangeoperator.c
+1
-0
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+12
-0
source/libs/executor/src/groupoperator.c
source/libs/executor/src/groupoperator.c
+2
-3
source/libs/function/src/detail/tavgfunction.c
source/libs/function/src/detail/tavgfunction.c
+1
-1
source/libs/function/src/detail/tminmax.c
source/libs/function/src/detail/tminmax.c
+1
-1
tests/system-test/1-insert/block_wise.py
tests/system-test/1-insert/block_wise.py
+1
-1
tests/system-test/2-query/avg.py
tests/system-test/2-query/avg.py
+4
-2
tests/system-test/2-query/max_partition.py
tests/system-test/2-query/max_partition.py
+1
-1
未找到文件。
include/libs/executor/executor.h
浏览文件 @
203ea1f9
...
...
@@ -142,8 +142,11 @@ int32_t qGetQueryTableSchemaVersion(qTaskInfo_t tinfo, char* dbName, char* table
*/
int32_t
qExecTaskOpt
(
qTaskInfo_t
tinfo
,
SArray
*
pResList
,
uint64_t
*
useconds
,
bool
*
hasMore
,
SLocalFetch
*
pLocal
);
int32_t
qExecTask
(
qTaskInfo_t
tinfo
,
SSDataBlock
**
pBlock
,
uint64_t
*
useconds
);
void
qCleanExecTaskBlockBuf
(
qTaskInfo_t
tinfo
);
/**
* kill the ongoing query asynchronously
* @param tinfo qhandle
...
...
source/common/src/tdatablock.c
浏览文件 @
203ea1f9
...
...
@@ -1322,10 +1322,6 @@ int32_t copyDataBlock(SSDataBlock* dst, const SSDataBlock* src) {
for
(
int32_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
SColumnInfoData
*
pDst
=
taosArrayGet
(
dst
->
pDataBlock
,
i
);
SColumnInfoData
*
pSrc
=
taosArrayGet
(
src
->
pDataBlock
,
i
);
if
(
pSrc
->
pData
==
NULL
)
{
continue
;
}
colDataAssign
(
pDst
,
pSrc
,
src
->
info
.
rows
,
&
src
->
info
);
}
...
...
source/dnode/vnode/src/sma/smaRollup.c
浏览文件 @
203ea1f9
...
...
@@ -739,11 +739,13 @@ static int32_t tdRSmaExecAndSubmitResult(SSma *pSma, qTaskInfo_t taskInfo, SRSma
}
}
tdBlockDataDestroy
(
pResList
);
taosArrayDestroy
(
pResList
);
qCleanExecTaskBlockBuf
(
taskInfo
);
return
TSDB_CODE_SUCCESS
;
_err:
tdBlockDataDestroy
(
pResList
);
taosArrayDestroy
(
pResList
);
qCleanExecTaskBlockBuf
(
taskInfo
);
return
TSDB_CODE_FAILED
;
}
...
...
source/libs/executor/src/exchangeoperator.c
浏览文件 @
203ea1f9
...
...
@@ -646,6 +646,7 @@ int32_t seqLoadRemoteData(SOperatorInfo* pOperator) {
SRetrieveTableRsp
*
pRsp
=
pDataInfo
->
pRsp
;
SLoadRemoteDataInfo
*
pLoadInfo
=
&
pExchangeInfo
->
loadInfo
;
if
(
pRsp
->
numOfRows
==
0
)
{
qDebug
(
"%s vgId:%d, taskID:0x%"
PRIx64
" execId:%d %d of total completed, rowsOfSource:%"
PRIu64
", totalRows:%"
PRIu64
" try next"
,
...
...
source/libs/executor/src/executor.c
浏览文件 @
203ea1f9
...
...
@@ -572,6 +572,18 @@ int32_t qExecTaskOpt(qTaskInfo_t tinfo, SArray* pResList, uint64_t* useconds, bo
return
pTaskInfo
->
code
;
}
void
qCleanExecTaskBlockBuf
(
qTaskInfo_t
tinfo
)
{
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
SArray
*
pList
=
pTaskInfo
->
pResultBlockList
;
size_t
num
=
taosArrayGetSize
(
pList
);
for
(
int32_t
i
=
0
;
i
<
num
;
++
i
)
{
SSDataBlock
**
p
=
taosArrayGet
(
pTaskInfo
->
pResultBlockList
,
i
);
blockDataDestroy
(
*
p
);
}
taosArrayClear
(
pTaskInfo
->
pResultBlockList
);
}
int32_t
qExecTask
(
qTaskInfo_t
tinfo
,
SSDataBlock
**
pRes
,
uint64_t
*
useconds
)
{
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
int64_t
threadId
=
taosGetSelfPthreadId
();
...
...
source/libs/executor/src/groupoperator.c
浏览文件 @
203ea1f9
...
...
@@ -274,10 +274,9 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SSDataBlock* pBlock) {
// return;
// }
int32_t
len
=
0
;
STimeWindow
w
=
TSWINDOW_INITIALIZER
;
int32_t
len
=
0
;
terrno
=
TSDB_CODE_SUCCESS
;
int32_t
num
=
0
;
for
(
int32_t
j
=
0
;
j
<
pBlock
->
info
.
rows
;
++
j
)
{
// Compare with the previous row of this column, and do not set the output buffer again if they are identical.
...
...
source/libs/function/src/detail/tavgfunction.c
浏览文件 @
203ea1f9
...
...
@@ -494,7 +494,7 @@ int32_t avgFunction(SqlFunctionCtx* pCtx) {
switch
(
type
)
{
case
TSDB_DATA_TYPE_UTINYINT
:
case
TSDB_DATA_TYPE_TINYINT
:
{
const
int8_t
*
plist
=
(
const
int8_t
*
)
&
pCol
->
pData
[
start
]
;
const
int8_t
*
plist
=
(
const
int8_t
*
)
pCol
->
pData
;
// 1. If the CPU supports AVX, let's employ AVX instructions to speedup this loop
if
(
simdAvailable
)
{
...
...
source/libs/function/src/detail/tminmax.c
浏览文件 @
203ea1f9
...
...
@@ -827,7 +827,7 @@ int32_t doMinMaxHelper(SqlFunctionCtx* pCtx, int32_t isMinFunc) {
if
(
i
>=
end
)
{
ASSERT
(
numOfElems
==
0
);
return
numOfElems
;
goto
_over
;
}
doExtractVal
(
pCol
,
i
,
end
,
pCtx
,
pBuf
,
isMinFunc
);
...
...
tests/system-test/1-insert/block_wise.py
浏览文件 @
203ea1f9
...
...
@@ -145,7 +145,7 @@ class TDTestCase:
def
init
(
self
,
conn
,
logSql
,
replicaVar
=
1
):
self
.
replicaVar
=
int
(
replicaVar
)
tdLog
.
debug
(
f
"start to excute
{
__file__
}
"
)
tdSql
.
init
(
conn
.
cursor
(),
Fals
e
)
tdSql
.
init
(
conn
.
cursor
(),
Tru
e
)
self
.
precision
=
"ms"
self
.
sma_count
=
0
self
.
sma_created_index
=
[]
...
...
tests/system-test/2-query/avg.py
浏览文件 @
203ea1f9
import
taos
import
sys
import
math
import
numpy
as
np
from
util.log
import
*
from
util.sql
import
*
...
...
@@ -411,7 +413,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
2
,
14042.142857143
)
tdSql
.
checkData
(
0
,
3
,
53.571428571
)
tdSql
.
checkData
(
0
,
4
,
5.828571332045761e+37
)
tdSql
.
checkData
(
0
,
5
,
None
)
tdSql
.
checkData
(
0
,
5
,
math
.
inf
)
# check + - * / in functions
...
...
@@ -421,7 +423,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
2
,
14042.142857143
)
tdSql
.
checkData
(
0
,
3
,
26.785714286
)
tdSql
.
checkData
(
0
,
4
,
2.9142856660228804e+37
)
tdSql
.
checkData
(
0
,
5
,
None
)
tdSql
.
checkData
(
0
,
5
,
math
.
inf
)
...
...
tests/system-test/2-query/max_partition.py
浏览文件 @
203ea1f9
...
...
@@ -7,7 +7,7 @@ class TDTestCase:
def
init
(
self
,
conn
,
logSql
,
replicaVar
=
1
):
self
.
replicaVar
=
int
(
replicaVar
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
()
,
True
)
self
.
row_nums
=
10
self
.
tb_nums
=
10
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录