Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
dd26ea23
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看板
提交
dd26ea23
编写于
3月 10, 2021
作者:
sangshuduo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix compiler error
上级
ef5fa204
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
16 deletion
+16
-16
src/query/src/qAggMain.c
src/query/src/qAggMain.c
+7
-7
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+6
-6
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+3
-3
未找到文件。
src/query/src/qAggMain.c
浏览文件 @
dd26ea23
...
...
@@ -362,7 +362,7 @@ int32_t getResultDataInfo(int32_t dataType, int32_t dataBytes, int32_t functionI
// TODO use hash table
int32_t
isValidFunction
(
const
char
*
name
,
int32_t
len
)
{
for
(
int32_t
i
=
0
;
i
<=
TSDB_FUNC_BLKINFO
;
++
i
)
{
int32_t
nameLen
=
strlen
(
aAggs
[
i
].
name
);
int32_t
nameLen
=
(
int32_t
)
strlen
(
aAggs
[
i
].
name
);
if
(
len
!=
nameLen
)
{
continue
;
}
...
...
@@ -4282,7 +4282,7 @@ static void interp_function_impl(SQLFunctionCtx *pCtx) {
if
(
type
==
TSDB_FILL_PREV
)
{
assignVal
(
pCtx
->
pOutput
,
pCtx
->
pInput
,
pCtx
->
outputBytes
,
pCtx
->
inputType
);
}
else
if
(
type
==
TSDB_FILL_NEXT
)
{
char
*
val
=
pCtx
->
pInput
+
pCtx
->
inputBytes
;
char
*
val
=
((
char
*
)
pCtx
->
pInput
)
+
pCtx
->
inputBytes
;
assignVal
(
pCtx
->
pOutput
,
val
,
pCtx
->
outputBytes
,
pCtx
->
inputType
);
}
else
if
(
type
==
TSDB_FILL_LINEAR
)
{
char
*
start
=
GET_INPUT_DATA
(
pCtx
,
0
);
...
...
@@ -4747,8 +4747,8 @@ void blockInfo_func(SQLFunctionCtx* pCtx) {
STableBlockDist
*
pDist
=
(
STableBlockDist
*
)
GET_ROWCELL_INTERBUF
(
pResInfo
);
int32_t
len
=
*
(
int32_t
*
)
pCtx
->
pInput
;
blockDistInfoFromBinary
(
pCtx
->
pInput
+
sizeof
(
int32_t
),
len
,
pDist
);
pDist
->
rowSize
=
pCtx
->
param
[
0
].
i64
;
blockDistInfoFromBinary
(
(
char
*
)
pCtx
->
pInput
+
sizeof
(
int32_t
),
len
,
pDist
);
pDist
->
rowSize
=
(
int16_t
)
pCtx
->
param
[
0
].
i64
;
memcpy
(
pCtx
->
pOutput
,
pCtx
->
pInput
,
sizeof
(
int32_t
)
+
len
);
...
...
@@ -4767,7 +4767,7 @@ static void mergeTableBlockDist(STableBlockDist* pDist, const STableBlockDist* p
pDist
->
dataBlockInfos
=
taosArrayInit
(
4
,
sizeof
(
SFileBlockInfo
));
}
taosArrayPushBatch
(
pDist
->
dataBlockInfos
,
pSrc
->
dataBlockInfos
->
pData
,
taosArrayGetSize
(
pSrc
->
dataBlockInfos
));
taosArrayPushBatch
(
pDist
->
dataBlockInfos
,
pSrc
->
dataBlockInfos
->
pData
,
(
int32_t
)
taosArrayGetSize
(
pSrc
->
dataBlockInfos
));
}
void
block_func_merge
(
SQLFunctionCtx
*
pCtx
)
{
...
...
@@ -4777,7 +4777,7 @@ void block_func_merge(SQLFunctionCtx* pCtx) {
STableBlockDist
info
=
{
0
};
int32_t
len
=
*
(
int32_t
*
)
pCtx
->
pInput
;
blockDistInfoFromBinary
(
pCtx
->
pInput
+
sizeof
(
int32_t
),
len
,
&
info
);
blockDistInfoFromBinary
(
((
char
*
)
pCtx
->
pInput
)
+
sizeof
(
int32_t
),
len
,
&
info
);
mergeTableBlockDist
(
pDist
,
&
info
);
}
...
...
@@ -4851,7 +4851,7 @@ void blockinfo_func_finalizer(SQLFunctionCtx* pCtx) {
SResultRowCellInfo
*
pResInfo
=
GET_RES_INFO
(
pCtx
);
STableBlockDist
*
pDist
=
(
STableBlockDist
*
)
GET_ROWCELL_INTERBUF
(
pResInfo
);
pDist
->
rowSize
=
pCtx
->
param
[
0
].
i64
;
pDist
->
rowSize
=
(
int16_t
)
pCtx
->
param
[
0
].
i64
;
generateBlockDistResult
(
pDist
,
pCtx
->
pOutput
);
// cannot set the numOfIteratedElems again since it is set during previous iteration
...
...
src/query/src/qExecutor.c
浏览文件 @
dd26ea23
...
...
@@ -560,7 +560,7 @@ static int32_t addNewWindowResultBuf(SResultRow *pWindowRes, SDiskbasedResultBuf
// set the number of rows in current disk page
if
(
pWindowRes
->
pageId
==
-
1
)
{
// not allocated yet, allocate new buffer
pWindowRes
->
pageId
=
pageId
;
pWindowRes
->
offset
=
pData
->
num
;
pWindowRes
->
offset
=
(
int32_t
)
pData
->
num
;
pData
->
num
+=
size
;
assert
(
pWindowRes
->
pageId
>=
0
);
...
...
@@ -941,7 +941,7 @@ static void doSetInputDataBlockInfo(SOperatorInfo* pOperator, SQLFunctionCtx* pC
for
(
int32_t
i
=
0
;
i
<
pOperator
->
numOfOutput
;
++
i
)
{
pCtx
[
i
].
order
=
order
;
pCtx
[
i
].
size
=
pBlock
->
info
.
rows
;
pCtx
[
i
].
currentStage
=
pOperator
->
pRuntimeEnv
->
scanFlag
;
pCtx
[
i
].
currentStage
=
(
uint8_t
)
pOperator
->
pRuntimeEnv
->
scanFlag
;
setBlockStatisInfo
(
&
pCtx
[
i
],
pBlock
,
&
pOperator
->
pExpr
[
i
].
base
.
colInfo
);
}
...
...
@@ -968,7 +968,7 @@ static void doSetInputDataBlock(SOperatorInfo* pOperator, SQLFunctionCtx* pCtx,
for
(
int32_t
i
=
0
;
i
<
pOperator
->
numOfOutput
;
++
i
)
{
pCtx
[
i
].
order
=
order
;
pCtx
[
i
].
size
=
pBlock
->
info
.
rows
;
pCtx
[
i
].
currentStage
=
pOperator
->
pRuntimeEnv
->
scanFlag
;
pCtx
[
i
].
currentStage
=
(
uint8_t
)
pOperator
->
pRuntimeEnv
->
scanFlag
;
setBlockStatisInfo
(
&
pCtx
[
i
],
pBlock
,
&
pOperator
->
pExpr
[
i
].
base
.
colInfo
);
...
...
@@ -1296,7 +1296,7 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SGroupbyOperatorInfo *pIn
}
for
(
int32_t
j
=
0
;
j
<
pSDataBlock
->
info
.
rows
;
++
j
)
{
char
*
val
=
pColInfoData
->
pData
+
bytes
*
j
;
char
*
val
=
((
char
*
)
pColInfoData
->
pData
)
+
bytes
*
j
;
if
(
isNull
(
val
,
type
))
{
continue
;
}
...
...
@@ -2351,7 +2351,7 @@ void filterRowsInDataBlock(SQueryRuntimeEnv* pRuntimeEnv, SSingleColumnFilterInf
SColumnInfoData
*
pColumnInfoData
=
taosArrayGet
(
pBlock
->
pDataBlock
,
i
);
int16_t
bytes
=
pColumnInfoData
->
info
.
bytes
;
memmove
(
pColumnInfoData
->
pData
+
start
*
bytes
,
pColumnInfoData
->
pData
+
cstart
*
bytes
,
len
*
bytes
);
memmove
(
((
char
*
)
pColumnInfoData
->
pData
)
+
start
*
bytes
,
pColumnInfoData
->
pData
+
cstart
*
bytes
,
len
*
bytes
);
}
start
+=
len
;
...
...
@@ -3446,7 +3446,7 @@ static void toSSDataBlock(SGroupResInfo *pGroupResInfo, SQueryRuntimeEnv* pRunti
if
(
pInfoData
->
info
.
type
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
STimeWindow
*
w
=
&
pBlock
->
info
.
window
;
w
->
skey
=
*
(
int64_t
*
)
pInfoData
->
pData
;
w
->
ekey
=
*
(
int64_t
*
)(
pInfoData
->
pData
+
TSDB_KEYSIZE
*
(
pBlock
->
info
.
rows
-
1
));
w
->
ekey
=
*
(
int64_t
*
)(
((
char
*
)
pInfoData
->
pData
)
+
TSDB_KEYSIZE
*
(
pBlock
->
info
.
rows
-
1
));
}
}
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
dd26ea23
...
...
@@ -2644,7 +2644,7 @@ bool tsdbGetExternalRow(TsdbQueryHandleT pHandle) {
return
false
;
}
int32_t
numOfCols
=
QH_GET_NUM_OF_COLS
(
pQueryHandle
);
int32_t
numOfCols
=
(
int32_t
)
QH_GET_NUM_OF_COLS
(
pQueryHandle
);
for
(
int32_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
SColumnInfoData
*
pColInfoData
=
taosArrayGet
(
pQueryHandle
->
pColumns
,
i
);
SColumnInfoData
*
first
=
taosArrayGet
(
pQueryHandle
->
prev
,
i
);
...
...
@@ -2652,11 +2652,11 @@ bool tsdbGetExternalRow(TsdbQueryHandleT pHandle) {
memcpy
(
pColInfoData
->
pData
,
first
->
pData
,
pColInfoData
->
info
.
bytes
);
SColumnInfoData
*
sec
=
taosArrayGet
(
pQueryHandle
->
next
,
i
);
memcpy
(
pColInfoData
->
pData
+
pColInfoData
->
info
.
bytes
,
sec
->
pData
,
pColInfoData
->
info
.
bytes
);
memcpy
(
((
char
*
)
pColInfoData
->
pData
)
+
pColInfoData
->
info
.
bytes
,
sec
->
pData
,
pColInfoData
->
info
.
bytes
);
if
(
i
==
0
&&
pColInfoData
->
info
.
type
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
cur
->
win
.
skey
=
*
(
TSKEY
*
)
pColInfoData
->
pData
;
cur
->
win
.
ekey
=
*
(
TSKEY
*
)(
pColInfoData
->
pData
+
TSDB_KEYSIZE
);
cur
->
win
.
ekey
=
*
(
TSKEY
*
)(
((
char
*
)
pColInfoData
->
pData
)
+
TSDB_KEYSIZE
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录