Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
0fc9f7e3
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看板
提交
0fc9f7e3
编写于
8月 07, 2021
作者:
Y
yihaoDeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-5797]<feature> support distict multi column
上级
aa8b12e2
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
1 deletion
+16
-1
src/common/src/tglobal.c
src/common/src/tglobal.c
+14
-0
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+2
-1
未找到文件。
src/common/src/tglobal.c
浏览文件 @
0fc9f7e3
...
@@ -84,6 +84,9 @@ int32_t tsMaxNumOfOrderedResults = 100000;
...
@@ -84,6 +84,9 @@ int32_t tsMaxNumOfOrderedResults = 100000;
// 10 ms for sliding time, the value will changed in case of time precision changed
// 10 ms for sliding time, the value will changed in case of time precision changed
int32_t
tsMinSlidingTime
=
10
;
int32_t
tsMinSlidingTime
=
10
;
// the maxinum number of distict query result
int32_t
tsMaxNumOfDistinctResults
=
1000
*
10000
;
// 1 us for interval time range, changed accordingly
// 1 us for interval time range, changed accordingly
int32_t
tsMinIntervalTime
=
1
;
int32_t
tsMinIntervalTime
=
1
;
...
@@ -541,6 +544,17 @@ static void doInitGlobalConfig(void) {
...
@@ -541,6 +544,17 @@ static void doInitGlobalConfig(void) {
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"maxNumOfDistinctRes"
;
cfg
.
ptr
=
&
tsMaxNumOfDistinctResults
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
|
TSDB_CFG_CTYPE_B_CLIENT
;
cfg
.
minValue
=
10
*
10000
;
cfg
.
maxValue
=
10000
*
10000
;
cfg
.
ptrLength
=
0
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"numOfMnodes"
;
cfg
.
option
=
"numOfMnodes"
;
cfg
.
ptr
=
&
tsNumOfMnodes
;
cfg
.
ptr
=
&
tsNumOfMnodes
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
...
...
src/query/src/qExecutor.c
浏览文件 @
0fc9f7e3
...
@@ -3394,6 +3394,7 @@ void setDefaultOutputBuf(SQueryRuntimeEnv *pRuntimeEnv, SOptrBasicInfo *pInfo, i
...
@@ -3394,6 +3394,7 @@ void setDefaultOutputBuf(SQueryRuntimeEnv *pRuntimeEnv, SOptrBasicInfo *pInfo, i
SResultRowInfo
*
pResultRowInfo
=
&
pInfo
->
resultRowInfo
;
SResultRowInfo
*
pResultRowInfo
=
&
pInfo
->
resultRowInfo
;
int64_t
tid
=
0
;
int64_t
tid
=
0
;
pRuntimeEnv
->
keyBuf
=
realloc
(
pRuntimeEnv
->
keyBuf
,
sizeof
(
tid
)
+
sizeof
(
int64_t
)
+
POINTER_BYTES
);
SResultRow
*
pRow
=
doSetResultOutBufByKey
(
pRuntimeEnv
,
pResultRowInfo
,
tid
,
(
char
*
)
&
tid
,
sizeof
(
tid
),
true
,
uid
);
SResultRow
*
pRow
=
doSetResultOutBufByKey
(
pRuntimeEnv
,
pResultRowInfo
,
tid
,
(
char
*
)
&
tid
,
sizeof
(
tid
),
true
,
uid
);
for
(
int32_t
i
=
0
;
i
<
pDataBlock
->
info
.
numOfCols
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
pDataBlock
->
info
.
numOfCols
;
++
i
)
{
...
@@ -6725,7 +6726,7 @@ SOperatorInfo* createDistinctOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperat
...
@@ -6725,7 +6726,7 @@ SOperatorInfo* createDistinctOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperat
SDistinctOperatorInfo
*
pInfo
=
calloc
(
1
,
sizeof
(
SDistinctOperatorInfo
));
SDistinctOperatorInfo
*
pInfo
=
calloc
(
1
,
sizeof
(
SDistinctOperatorInfo
));
pInfo
->
totalBytes
=
0
;
pInfo
->
totalBytes
=
0
;
pInfo
->
buf
=
NULL
;
pInfo
->
buf
=
NULL
;
pInfo
->
threshold
=
HASH_CAPACITY_LIMIT
;
// distinct result threshold
pInfo
->
threshold
=
tsMaxNumOfDistinctResults
;
// distinct result threshold
pInfo
->
outputCapacity
=
4096
;
pInfo
->
outputCapacity
=
4096
;
pInfo
->
pDistinctDataInfo
=
taosArrayInit
(
numOfOutput
,
sizeof
(
SDistinctDataInfo
));
pInfo
->
pDistinctDataInfo
=
taosArrayInit
(
numOfOutput
,
sizeof
(
SDistinctDataInfo
));
pInfo
->
pSet
=
taosHashInit
(
64
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
),
false
,
HASH_NO_LOCK
);
pInfo
->
pSet
=
taosHashInit
(
64
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
),
false
,
HASH_NO_LOCK
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录