Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
373a2878
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看板
未验证
提交
373a2878
编写于
3月 18, 2022
作者:
D
dapan1121
提交者:
GitHub
3月 18, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #10785 from taosdata/feature/TD-14104
fix core if subquery reslut is too large in unique function
上级
56fd29e8
441691c9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
8 deletion
+9
-8
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+8
-7
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+1
-1
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
373a2878
...
@@ -3359,11 +3359,6 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
...
@@ -3359,11 +3359,6 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
}
else
{
}
else
{
tVariantDump
(
pVariant
,
val
,
TSDB_DATA_TYPE_BIGINT
,
true
);
tVariantDump
(
pVariant
,
val
,
TSDB_DATA_TYPE_BIGINT
,
true
);
int64_t
numRowsSelected
=
GET_INT64_VAL
(
val
);
if
(
functionId
!=
TSDB_FUNC_UNIQUE
&&
(
numRowsSelected
<=
0
||
numRowsSelected
>
100
))
{
// todo use macro
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg12
);
}
if
(
functionId
==
TSDB_FUNC_UNIQUE
){
// consider of memory size
if
(
functionId
==
TSDB_FUNC_UNIQUE
){
// consider of memory size
if
(
pSchema
->
bytes
<
10
){
if
(
pSchema
->
bytes
<
10
){
GET_INT64_VAL
(
val
)
=
MAX_UNIQUE_RESULT_ROWS
*
100
;
GET_INT64_VAL
(
val
)
=
MAX_UNIQUE_RESULT_ROWS
*
100
;
...
@@ -3373,6 +3368,11 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
...
@@ -3373,6 +3368,11 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
GET_INT64_VAL
(
val
)
=
MAX_UNIQUE_RESULT_ROWS
;
GET_INT64_VAL
(
val
)
=
MAX_UNIQUE_RESULT_ROWS
;
}
}
}
}
int64_t
numRowsSelected
=
GET_INT64_VAL
(
val
);
if
(
functionId
!=
TSDB_FUNC_UNIQUE
&&
(
numRowsSelected
<=
0
||
numRowsSelected
>
100
))
{
// todo use macro
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg12
);
}
// todo REFACTOR
// todo REFACTOR
// set the first column ts for top/bottom query
// set the first column ts for top/bottom query
SColumnIndex
index1
=
{
index
.
tableIndex
,
PRIMARYKEY_TIMESTAMP_COL_INDEX
};
SColumnIndex
index1
=
{
index
.
tableIndex
,
PRIMARYKEY_TIMESTAMP_COL_INDEX
};
...
@@ -3385,9 +3385,10 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
...
@@ -3385,9 +3385,10 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
aAggs
[
TSDB_FUNC_TS
].
name
,
pExpr
);
aAggs
[
TSDB_FUNC_TS
].
name
,
pExpr
);
colIndex
+=
1
;
// the first column is ts
colIndex
+=
1
;
// the first column is ts
getResultDataInfo
(
pSchema
->
type
,
pSchema
->
bytes
,
functionId
,
(
int32_t
)
numRowsSelected
,
&
resultType
,
&
resultSize
,
&
interResult
,
0
,
false
,
pUdfInfo
);
pExpr
=
tscExprAppend
(
pQueryInfo
,
functionId
,
&
index
,
resultType
,
resultSize
,
getNewResColId
(
pCmd
),
pExpr
=
tscExprAppend
(
pQueryInfo
,
functionId
,
&
index
,
resultType
,
resultSize
,
getNewResColId
(
pCmd
),
resultSize
,
false
);
interResult
,
false
);
if
(
functionId
==
TSDB_FUNC_TAIL
){
if
(
functionId
==
TSDB_FUNC_TAIL
){
int64_t
offset
=
0
;
int64_t
offset
=
0
;
if
(
taosArrayGetSize
(
pItem
->
pNode
->
Expr
.
paramList
)
==
3
){
if
(
taosArrayGetSize
(
pItem
->
pNode
->
Expr
.
paramList
)
==
3
){
...
...
src/client/src/tscUtil.c
浏览文件 @
373a2878
...
@@ -1491,7 +1491,7 @@ void handleDownstreamOperator(SSqlObj** pSqlObjList, int32_t numOfUpstream, SQue
...
@@ -1491,7 +1491,7 @@ void handleDownstreamOperator(SSqlObj** pSqlObjList, int32_t numOfUpstream, SQue
pex
->
base
.
param
[
2
].
nType
=
TSDB_DATA_TYPE_INT
;
pex
->
base
.
param
[
2
].
nType
=
TSDB_DATA_TYPE_INT
;
pex
->
base
.
param
[
2
].
i64
=
pInputQI
->
order
.
order
;
pex
->
base
.
param
[
2
].
i64
=
pInputQI
->
order
.
order
;
}
}
}
}
}
}
tscDebug
(
"0x%"
PRIx64
" create QInfo 0x%"
PRIx64
" to execute the main query while all nest queries are ready"
,
pSql
->
self
,
pSql
->
self
);
tscDebug
(
"0x%"
PRIx64
" create QInfo 0x%"
PRIx64
" to execute the main query while all nest queries are ready"
,
pSql
->
self
,
pSql
->
self
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录