Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f1741261
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f1741261
编写于
3月 07, 2022
作者:
A
Alex Duan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TS-207]<fix>(query): if tbname go old and case add
上级
748ec3fc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
8 deletion
+22
-8
src/client/src/tscGlobalmerge.c
src/client/src/tscGlobalmerge.c
+3
-3
src/query/inc/qExtbuffer.h
src/query/inc/qExtbuffer.h
+1
-1
src/query/src/qExtbuffer.c
src/query/src/qExtbuffer.c
+18
-4
未找到文件。
src/client/src/tscGlobalmerge.c
浏览文件 @
f1741261
...
...
@@ -819,7 +819,7 @@ SSDataBlock* doMultiwayMergeSort(void* param, bool* newgroup) {
pOneDataSrc
->
rowIdx
,
pIndex
->
colIndex
);
char
*
data
=
pInfo
->
prevRow
[
i
];
int32_t
ret
=
columnValueAscendingComparator
(
data
,
newRow
,
pColInfo
->
info
.
type
,
pColInfo
->
info
.
bytes
);
int32_t
ret
=
columnValueAscendingComparator
(
data
,
newRow
,
pColInfo
->
info
.
type
,
pColInfo
->
info
.
bytes
,
true
);
if
(
ret
==
0
)
{
continue
;
}
else
{
...
...
@@ -881,7 +881,7 @@ static bool isSameGroup(SArray* orderColumnList, SSDataBlock* pBlock, char** dat
assert
(
pIndex
->
colId
==
pColInfo
->
info
.
colId
);
char
*
data
=
dataCols
[
i
];
int32_t
ret
=
columnValueAscendingComparator
(
data
,
pColInfo
->
pData
,
pColInfo
->
info
.
type
,
pColInfo
->
info
.
bytes
);
int32_t
ret
=
columnValueAscendingComparator
(
data
,
pColInfo
->
pData
,
pColInfo
->
info
.
type
,
pColInfo
->
info
.
bytes
,
true
);
if
(
ret
==
0
)
{
continue
;
}
else
{
...
...
@@ -1067,7 +1067,7 @@ static int32_t doSlimitImpl(SOperatorInfo* pOperator, SSLimitOperatorInfo* pInfo
SColumnInfo
*
pColInfo
=
&
pColInfoData
->
info
;
char
*
d
=
rowIndex
*
pColInfo
->
bytes
+
(
char
*
)
pColInfoData
->
pData
;
int32_t
ret
=
columnValueAscendingComparator
(
pInfo
->
prevRow
[
i
],
d
,
pColInfo
->
type
,
pColInfo
->
bytes
);
int32_t
ret
=
columnValueAscendingComparator
(
pInfo
->
prevRow
[
i
],
d
,
pColInfo
->
type
,
pColInfo
->
bytes
,
true
);
if
(
ret
!=
0
)
{
// it is a new group
samegroup
=
false
;
break
;
...
...
src/query/inc/qExtbuffer.h
浏览文件 @
f1741261
...
...
@@ -254,7 +254,7 @@ int32_t compare_d(tOrderDescriptor *, int32_t numOfRow1, int32_t s1, char *data1
struct
SSDataBlock
;
int32_t
compare_aRv
(
struct
SSDataBlock
*
pBlock
,
SArray
*
colIndex
,
int32_t
numOfCols
,
int32_t
rowIndex
,
char
**
buffer
,
int32_t
order
);
int32_t
columnValueAscendingComparator
(
char
*
f1
,
char
*
f2
,
int32_t
type
,
int32_t
bytes
);
int32_t
columnValueAscendingComparator
(
char
*
f1
,
char
*
f2
,
int32_t
type
,
int32_t
bytes
,
bool
lenFirst
);
#ifdef __cplusplus
}
...
...
src/query/src/qExtbuffer.c
浏览文件 @
f1741261
...
...
@@ -366,7 +366,7 @@ static int32_t tsCompareFunc(TSKEY k1, TSKEY k2, int32_t order) {
}
}
int32_t
columnValueAscendingComparator
(
char
*
f1
,
char
*
f2
,
int32_t
type
,
int32_t
bytes
)
{
int32_t
columnValueAscendingComparator
(
char
*
f1
,
char
*
f2
,
int32_t
type
,
int32_t
bytes
,
bool
lenFirst
)
{
if
(
type
==
TSDB_DATA_TYPE_JSON
){
bool
canReturn
=
true
;
int32_t
result
=
jsonCompareUnit
(
f1
,
f2
,
&
canReturn
);
...
...
@@ -388,6 +388,13 @@ int32_t columnValueAscendingComparator(char *f1, char *f2, int32_t type, int32_t
int32_t
len1
=
varDataLen
(
f1
);
int32_t
len2
=
varDataLen
(
f2
);
// length first compare
if
(
lenFirst
)
{
if
(
len1
>
len2
)
return
1
;
else
if
(
len1
<
len2
)
return
-
1
;
}
// compare zero length
if
(
len1
==
0
&&
len2
==
0
)
return
0
;
...
...
@@ -406,6 +413,13 @@ int32_t columnValueAscendingComparator(char *f1, char *f2, int32_t type, int32_t
int32_t
len1
=
varDataLen
(
f1
);
int32_t
len2
=
varDataLen
(
f2
);
// length first compare
if
(
lenFirst
)
{
if
(
len1
>
len2
)
return
1
;
else
if
(
len1
<
len2
)
return
-
1
;
}
// compare zero length
if
(
len1
==
0
&&
len2
==
0
)
return
0
;
...
...
@@ -449,7 +463,7 @@ int32_t compare_a(tOrderDescriptor *pDescriptor, int32_t numOfRows1, int32_t s1,
}
}
else
{
SSchemaEx
*
pSchema
=
&
pDescriptor
->
pColumnModel
->
pFields
[
colIdx
];
int32_t
ret
=
columnValueAscendingComparator
(
f1
,
f2
,
pSchema
->
field
.
type
,
pSchema
->
field
.
bytes
);
int32_t
ret
=
columnValueAscendingComparator
(
f1
,
f2
,
pSchema
->
field
.
type
,
pSchema
->
field
.
bytes
,
strcmp
(
pSchema
->
field
.
name
,
TSQL_TBNAME_L
)
==
0
);
if
(
ret
==
0
)
{
continue
;
}
else
{
...
...
@@ -478,7 +492,7 @@ int32_t compare_aRv(SSDataBlock* pBlock, SArray* colIndex, int32_t numOfCols, in
return
ret
;
}
}
else
{
int32_t
ret
=
columnValueAscendingComparator
(
data
,
buffer
[
i
],
pColInfo
->
info
.
type
,
pColInfo
->
info
.
bytes
);
int32_t
ret
=
columnValueAscendingComparator
(
data
,
buffer
[
i
],
pColInfo
->
info
.
type
,
pColInfo
->
info
.
bytes
,
false
);
if
(
ret
==
0
)
{
continue
;
}
else
{
...
...
@@ -510,7 +524,7 @@ int32_t compare_d(tOrderDescriptor *pDescriptor, int32_t numOfRows1, int32_t s1,
}
}
else
{
SSchemaEx
*
pSchema
=
&
pDescriptor
->
pColumnModel
->
pFields
[
colIdx
];
int32_t
ret
=
columnValueAscendingComparator
(
f1
,
f2
,
pSchema
->
field
.
type
,
pSchema
->
field
.
bytes
);
int32_t
ret
=
columnValueAscendingComparator
(
f1
,
f2
,
pSchema
->
field
.
type
,
pSchema
->
field
.
bytes
,
strcmp
(
pSchema
->
field
.
name
,
TSQL_TBNAME_L
)
==
0
);
if
(
ret
==
0
)
{
continue
;
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录