Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e4a71197
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看板
未验证
提交
e4a71197
编写于
7月 02, 2022
作者:
wmmhello
提交者:
GitHub
7月 02, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #14458 from taosdata/feature/TD-13041
fix: erro in json in operator
上级
76b5ddc7
fcea74fe
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
26 addition
and
14 deletion
+26
-14
include/util/types.h
include/util/types.h
+1
-0
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+1
-1
source/libs/scalar/src/filter.c
source/libs/scalar/src/filter.c
+2
-2
source/libs/scalar/src/scalar.c
source/libs/scalar/src/scalar.c
+18
-7
source/util/src/tcompare.c
source/util/src/tcompare.c
+2
-2
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+2
-2
未找到文件。
include/util/types.h
浏览文件 @
e4a71197
...
...
@@ -83,6 +83,7 @@ typedef uint16_t VarDataLenT; // maxVarDataLen: 32767
#define varDataLen(v) ((VarDataLenT *)(v))[0]
#define varDataVal(v) ((char *)(v) + VARSTR_HEADER_SIZE)
#define varDataTLen(v) (sizeof(VarDataLenT) + varDataLen(v))
#define NCHAR_WIDTH_TO_BYTES(n) ((n) * TSDB_NCHAR_SIZE + VARSTR_HEADER_SIZE)
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
e4a71197
...
...
@@ -4101,7 +4101,7 @@ int32_t generateGroupIdMap(STableListInfo* pTableListInfo, SReadHandle* pHandle,
ASSERT
(
nodeType
(
pNew
)
==
QUERY_NODE_VALUE
);
SValueNode
*
pValue
=
(
SValueNode
*
)
pNew
;
if
(
pValue
->
node
.
resType
.
type
==
TSDB_DATA_TYPE_NULL
)
{
if
(
pValue
->
node
.
resType
.
type
==
TSDB_DATA_TYPE_NULL
||
pValue
->
isNull
)
{
isNull
[
index
++
]
=
1
;
continue
;
}
else
{
...
...
source/libs/scalar/src/filter.c
浏览文件 @
e4a71197
...
...
@@ -196,7 +196,7 @@ int8_t filterGetCompFuncIdx(int32_t type, int32_t optr) {
terrno
=
TSDB_CODE_QRY_JSON_IN_ERROR
;
return
0
;
default:
assert
(
0
)
;
return
0
;
}
}
...
...
@@ -222,7 +222,7 @@ int8_t filterGetCompFuncIdx(int32_t type, int32_t optr) {
terrno
=
TSDB_CODE_QRY_JSON_IN_ERROR
;
return
0
;
default:
assert
(
0
)
;
return
0
;
}
}
...
...
source/libs/scalar/src/scalar.c
浏览文件 @
e4a71197
...
...
@@ -109,9 +109,8 @@ int32_t scalarGenerateSetFromList(void **data, void *pNode, uint32_t type) {
}
if
(
IS_VAR_DATA_TYPE
(
type
))
{
char
*
data
=
colDataGetVarData
(
out
.
columnData
,
0
);
len
=
varDataLen
(
data
);
buf
=
varDataVal
(
data
);
buf
=
colDataGetVarData
(
out
.
columnData
,
0
);
len
=
varDataTLen
(
data
);
}
else
{
len
=
tDataTypes
[
type
].
bytes
;
buf
=
out
.
columnData
->
pData
;
...
...
@@ -119,8 +118,7 @@ int32_t scalarGenerateSetFromList(void **data, void *pNode, uint32_t type) {
}
else
{
buf
=
nodesGetValueFromNode
(
valueNode
);
if
(
IS_VAR_DATA_TYPE
(
type
))
{
len
=
varDataLen
(
buf
);
buf
=
varDataVal
(
buf
);
len
=
varDataTLen
(
buf
);
}
else
{
len
=
valueNode
->
node
.
resType
.
bytes
;
}
...
...
@@ -194,7 +192,7 @@ int32_t sclInitParam(SNode* node, SScalarParam *param, SScalarCtx *ctx, int32_t
param
->
numOfRows
=
1
;
param
->
columnData
=
sclCreateColumnInfoData
(
&
valueNode
->
node
.
resType
,
1
);
if
(
TSDB_DATA_TYPE_NULL
==
valueNode
->
node
.
resType
.
type
)
{
if
(
TSDB_DATA_TYPE_NULL
==
valueNode
->
node
.
resType
.
type
||
valueNode
->
isNull
)
{
colDataAppendNULL
(
param
->
columnData
,
0
);
}
else
{
colDataAppend
(
param
->
columnData
,
0
,
nodesGetValueFromNode
(
valueNode
),
false
);
...
...
@@ -538,6 +536,14 @@ int32_t sclExecOperator(SOperatorNode *node, SScalarCtx *ctx, SScalarParam *outp
int32_t
rowNum
=
0
;
int32_t
code
=
0
;
// json not support in in operator
if
(
nodeType
(
node
->
pLeft
)
==
QUERY_NODE_VALUE
){
SValueNode
*
valueNode
=
(
SValueNode
*
)
node
->
pLeft
;
if
(
valueNode
->
node
.
resType
.
type
==
TSDB_DATA_TYPE_JSON
&&
(
node
->
opType
==
OP_TYPE_IN
||
node
->
opType
==
OP_TYPE_NOT_IN
)){
SCL_RET
(
TSDB_CODE_QRY_JSON_IN_ERROR
);
}
}
SCL_ERR_RET
(
sclInitOperatorParams
(
&
params
,
node
,
ctx
,
&
rowNum
));
output
->
columnData
=
sclCreateColumnInfoData
(
&
node
->
node
.
resType
,
rowNum
);
if
(
output
->
columnData
==
NULL
)
{
...
...
@@ -777,7 +783,12 @@ EDealRes sclRewriteOperator(SNode** pNode, SScalarCtx *ctx) {
res
->
translate
=
true
;
if
(
colDataIsNull_s
(
output
.
columnData
,
0
))
{
res
->
node
.
resType
.
type
=
TSDB_DATA_TYPE_NULL
;
if
(
node
->
node
.
resType
.
type
!=
TSDB_DATA_TYPE_JSON
){
res
->
node
.
resType
.
type
=
TSDB_DATA_TYPE_NULL
;
}
else
{
res
->
node
.
resType
=
node
->
node
.
resType
;
res
->
isNull
=
true
;
}
}
else
{
res
->
node
.
resType
=
node
->
node
.
resType
;
int32_t
type
=
output
.
columnData
->
info
.
type
;
...
...
source/util/src/tcompare.c
浏览文件 @
e4a71197
...
...
@@ -56,11 +56,11 @@ int32_t setChkNotInBytes8(const void *pLeft, const void *pRight) {
}
int32_t
compareChkInString
(
const
void
*
pLeft
,
const
void
*
pRight
)
{
return
NULL
!=
taosHashGet
((
SHashObj
*
)
pRight
,
varDataVal
(
pLeft
),
varData
Len
(
pLeft
))
?
1
:
0
;
return
NULL
!=
taosHashGet
((
SHashObj
*
)
pRight
,
pLeft
,
varDataT
Len
(
pLeft
))
?
1
:
0
;
}
int32_t
compareChkNotInString
(
const
void
*
pLeft
,
const
void
*
pRight
)
{
return
NULL
==
taosHashGet
((
SHashObj
*
)
pRight
,
varDataVal
(
pLeft
),
varData
Len
(
pLeft
))
?
1
:
0
;
return
NULL
==
taosHashGet
((
SHashObj
*
)
pRight
,
pLeft
,
varDataT
Len
(
pLeft
))
?
1
:
0
;
}
int32_t
compareInt8Val
(
const
void
*
pLeft
,
const
void
*
pRight
)
{
...
...
tests/system-test/fulltest.sh
浏览文件 @
e4a71197
...
...
@@ -118,8 +118,8 @@ python3 ./test.py -f 2-query/queryQnode.py
python3 ./test.py
-f
6-cluster/5dnode1mnode.py
python3 ./test.py
-f
6-cluster/5dnode2mnode.py
-N
5
-M
3
python3 ./test.py
-f
6-cluster/5dnode3mnodeStop.py
-N
5
-M
3
python3 ./test.py
-f
6-cluster/5dnode3mnodeStopLoop.py
-N
5
-M
3
#
python3 ./test.py -f 6-cluster/5dnode3mnodeStop.py -N 5 -M 3
#
python3 ./test.py -f 6-cluster/5dnode3mnodeStopLoop.py -N 5 -M 3
# BUG python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py -N 5 -M 3
# BUG python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py -N 5 -M 3
python3 ./test.py
-f
6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py
-N
5
-M
3
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录