Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
e683e4f7
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e683e4f7
编写于
4月 25, 2021
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-225]merge develop.
上级
2df82f06
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
12 deletion
+14
-12
src/client/src/tscLocalMerge.c
src/client/src/tscLocalMerge.c
+1
-1
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+11
-9
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+1
-1
src/query/src/queryMain.c
src/query/src/queryMain.c
+1
-1
未找到文件。
src/client/src/tscLocalMerge.c
浏览文件 @
e683e4f7
...
...
@@ -171,7 +171,7 @@ void tscCreateLocalMerger(tExtMemBuffer **pMemBuffer, int32_t numOfBuffer, tOrde
pMerger
->
numOfVnode
=
numOfBuffer
;
pMerger
->
pDesc
=
pDesc
;
tscDebug
(
"0x%"
PRIx64
" the number of merged leaves is: %d"
,
pSql
->
self
,
p
Reduc
er
->
numOfBuffer
);
tscDebug
(
"0x%"
PRIx64
" the number of merged leaves is: %d"
,
pSql
->
self
,
p
Merg
er
->
numOfBuffer
);
int32_t
idx
=
0
;
for
(
int32_t
i
=
0
;
i
<
numOfBuffer
;
++
i
)
{
...
...
src/client/src/tscSQLParser.c
浏览文件 @
e683e4f7
...
...
@@ -3086,7 +3086,7 @@ static SColumnFilterInfo* addColumnFilterInfo(SColumnFilterList* filterList) {
return
pColFilterInfo
;
}
static
int32_t
doExtractColumnFilterInfo
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
,
STableMeta
*
pTableMeta
,
SColumnFilterInfo
*
pColumnFilter
,
static
int32_t
doExtractColumnFilterInfo
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
,
int32_t
timePrecision
,
SColumnFilterInfo
*
pColumnFilter
,
int16_t
colType
,
tSqlExpr
*
pExpr
)
{
const
char
*
msg
=
"not supported filter condition"
;
...
...
@@ -3102,9 +3102,7 @@ static int32_t doExtractColumnFilterInfo(SSqlCmd* pCmd, SQueryInfo* pQueryInfo,
return
retVal
;
}
}
else
if
((
colType
==
TSDB_DATA_TYPE_TIMESTAMP
)
&&
(
TSDB_DATA_TYPE_BIGINT
==
pRight
->
value
.
nType
))
{
STableComInfo
tinfo
=
tscGetTableInfo
(
pTableMeta
);
if
((
tinfo
.
precision
==
TSDB_TIME_PRECISION_MILLI
)
&&
(
pRight
->
flags
&
(
1
<<
EXPR_FLAG_US_TIMESTAMP
)))
{
if
((
timePrecision
==
TSDB_TIME_PRECISION_MILLI
)
&&
(
pRight
->
flags
&
(
1
<<
EXPR_FLAG_US_TIMESTAMP
)))
{
pRight
->
value
.
i64
/=
1000
;
}
}
...
...
@@ -3303,7 +3301,9 @@ static int32_t extractColumnFilterInfo(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SC
pColumn
->
columnIndex
=
pIndex
->
columnIndex
;
pColumn
->
tableUid
=
pTableMeta
->
id
.
uid
;
return
doExtractColumnFilterInfo
(
pCmd
,
pQueryInfo
,
pColFilter
,
pColumn
->
info
.
type
,
pExpr
);
STableComInfo
tinfo
=
tscGetTableInfo
(
pTableMeta
);
return
doExtractColumnFilterInfo
(
pCmd
,
pQueryInfo
,
tinfo
.
precision
,
pColFilter
,
pSchema
->
type
,
pExpr
);
}
static
int32_t
getTablenameCond
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
,
tSqlExpr
*
pTableCond
,
SStringBuilder
*
sb
)
{
...
...
@@ -6878,7 +6878,7 @@ static int32_t handleExprInHavingClause(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, S
const
char
*
msg3
=
"invalid operator for bool column in having clause"
;
SColumnFilterInfo
*
pColFilter
=
NULL
;
// TODO refactor: validate the expression
/*
* in case of TK_AND filter condition, we first find the corresponding column and build the query condition together
* the already existed condition.
...
...
@@ -6940,7 +6940,11 @@ static int32_t handleExprInHavingClause(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, S
}
}
int32_t
ret
=
doExtractColumnFilterInfo
(
pCmd
,
pQueryInfo
,
pColFilter
,
expr
->
base
.
resType
,
pExpr
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
STableMeta
*
pTableMeta
=
pTableMetaInfo
->
pTableMeta
;
int32_t
ret
=
doExtractColumnFilterInfo
(
pCmd
,
pQueryInfo
,
pTableMeta
->
tableInfo
.
precision
,
pColFilter
,
expr
->
base
.
resType
,
pExpr
);
if
(
ret
)
{
return
ret
;
}
...
...
@@ -6979,8 +6983,6 @@ int32_t getHavingExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SArray* pSelectNode
pLeft
=
pExpr
->
pLeft
;
pRight
=
pExpr
->
pRight
;
if
(
pLeft
->
type
!=
SQL_NODE_SQLFUNCTION
)
{
return
invalidSqlErrMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg1
);
}
...
...
src/query/src/qExecutor.c
浏览文件 @
e683e4f7
...
...
@@ -4558,7 +4558,7 @@ SOperatorInfo* createGlobalAggregateOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv,
offset
+=
pExpr
[
index
->
colIndex
].
base
.
resBytes
;
}
numOfCols
=
(
pInfo
->
groupColumnList
!=
NULL
)
?
taosArrayGetSize
(
pInfo
->
groupColumnList
)
:
0
;
numOfCols
=
(
pInfo
->
groupColumnList
!=
NULL
)
?
(
int32_t
)
taosArrayGetSize
(
pInfo
->
groupColumnList
)
:
0
;
pInfo
->
currentGroupColData
=
calloc
(
1
,
(
POINTER_BYTES
*
numOfCols
+
len
));
offset
=
POINTER_BYTES
*
numOfCols
;
...
...
src/query/src/queryMain.c
浏览文件 @
e683e4f7
...
...
@@ -282,7 +282,7 @@ int32_t qRetrieveQueryResultInfo(qinfo_t qinfo, bool* buildRes, void* pRspContex
assert
(
pQInfo
->
rspContext
==
NULL
);
if
(
pQInfo
->
dataReady
==
QUERY_RESULT_READY
)
{
*
buildRes
=
true
;
qDebug
(
"QInfo:0x%"
PRIx64
" retrieve result info, rowsize:%d, rows:%d, code:%s"
,
pQInfo
->
qId
,
pQuery
->
resultRowSize
,
qDebug
(
"QInfo:0x%"
PRIx64
" retrieve result info, rowsize:%d, rows:%d, code:%s"
,
pQInfo
->
qId
,
pQuery
Attr
->
resultRowSize
,
GET_NUM_OF_RESULTS
(
pRuntimeEnv
),
tstrerror
(
pQInfo
->
code
));
}
else
{
*
buildRes
=
false
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录