Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
cd73d9ad
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,发现更多精彩内容 >>
提交
cd73d9ad
编写于
10月 16, 2021
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-6129<feature> support null true false for json tag
上级
cd8b081b
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
60 addition
and
46 deletion
+60
-46
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+2
-2
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+21
-20
src/common/src/ttypes.c
src/common/src/ttypes.c
+5
-1
src/inc/taosdef.h
src/inc/taosdef.h
+1
-1
src/inc/ttype.h
src/inc/ttype.h
+1
-1
src/tsdb/src/tsdbMeta.c
src/tsdb/src/tsdbMeta.c
+29
-14
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+1
-7
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
cd73d9ad
...
@@ -4433,11 +4433,11 @@ static int32_t validateJsonTagExpr(tSqlExpr* pExpr, char* msgBuf) {
...
@@ -4433,11 +4433,11 @@ static int32_t validateJsonTagExpr(tSqlExpr* pExpr, char* msgBuf) {
if
(
pRight
!=
NULL
&&
pRight
->
value
.
nLen
>=
TSDB_COL_NAME_LEN
)
if
(
pRight
!=
NULL
&&
pRight
->
value
.
nLen
>=
TSDB_COL_NAME_LEN
)
return
invalidOperationMsg
(
msgBuf
,
msg2
);
return
invalidOperationMsg
(
msgBuf
,
msg2
);
}
else
{
}
else
{
if
(
pLeft
!=
NULL
&&
(
pLeft
->
tokenId
==
TK_ID
)
)
{
if
(
pLeft
!=
NULL
&&
pLeft
->
tokenId
==
TK_ID
&&
pExpr
->
tokenId
!=
TK_NULL
)
{
return
invalidOperationMsg
(
msgBuf
,
msg1
);
return
invalidOperationMsg
(
msgBuf
,
msg1
);
}
}
if
(
pLeft
!=
NULL
&&
(
pLeft
->
tokenId
==
TK_ARROW
)
)
{
if
(
pLeft
!=
NULL
&&
pLeft
->
tokenId
==
TK_ARROW
)
{
if
(
pLeft
->
pRight
&&
!
IS_VAR_DATA_TYPE
(
pLeft
->
pRight
->
value
.
nType
))
if
(
pLeft
->
pRight
&&
!
IS_VAR_DATA_TYPE
(
pLeft
->
pRight
->
value
.
nType
))
return
invalidOperationMsg
(
msgBuf
,
msg3
);
return
invalidOperationMsg
(
msgBuf
,
msg3
);
if
(
pLeft
->
pRight
&&
pLeft
->
pRight
->
value
.
nLen
>=
TSDB_COL_NAME_LEN
)
if
(
pLeft
->
pRight
&&
pLeft
->
pRight
->
value
.
nLen
>=
TSDB_COL_NAME_LEN
)
...
...
src/client/src/tscUtil.c
浏览文件 @
cd73d9ad
...
@@ -5198,8 +5198,6 @@ void findTagValue(STable* data, char* key, int32_t keyLen, char** out, int* len)
...
@@ -5198,8 +5198,6 @@ void findTagValue(STable* data, char* key, int32_t keyLen, char** out, int* len)
*
len
=
LONG_BYTES
+
CHAR_BYTES
;
*
len
=
LONG_BYTES
+
CHAR_BYTES
;
}
else
if
(
*
(
char
*
)
result
==
TSDB_DATA_TYPE_BOOL
)
{
}
else
if
(
*
(
char
*
)
result
==
TSDB_DATA_TYPE_BOOL
)
{
*
len
=
CHAR_BYTES
+
CHAR_BYTES
;
*
len
=
CHAR_BYTES
+
CHAR_BYTES
;
}
else
if
(
*
(
char
*
)
result
==
TSDB_DATA_TYPE_NULL
)
{
*
len
=
CHAR_BYTES
+
CHAR_BYTES
;
}
else
{
}
else
{
tscError
(
"unsupportted json value"
);
tscError
(
"unsupportted json value"
);
return
;
return
;
...
@@ -5228,9 +5226,8 @@ void parseTagValue2Dst(char* result, char* dst){
...
@@ -5228,9 +5226,8 @@ void parseTagValue2Dst(char* result, char* dst){
sprintf
(
varDataVal
(
dst
),
"%"
PRId64
,
jsonVd
);
sprintf
(
varDataVal
(
dst
),
"%"
PRId64
,
jsonVd
);
varDataSetLen
(
dst
,
strlen
(
varDataVal
(
dst
)));
varDataSetLen
(
dst
,
strlen
(
varDataVal
(
dst
)));
}
else
if
(
*
(
char
*
)
result
==
TSDB_DATA_TYPE_BOOL
)
{
}
else
if
(
*
(
char
*
)
result
==
TSDB_DATA_TYPE_BOOL
)
{
sprintf
(
varDataVal
(
dst
),
"%s"
,
(
*
((
char
*
)
realData
)
==
1
)
?
"true"
:
"false"
);
}
else
if
(
*
(
char
*
)
result
==
TSDB_DATA_TYPE_NULL
)
{
varDataSetLen
(
dst
,
strlen
(
varDataVal
(
dst
)));
}
}
}
}
...
@@ -5243,20 +5240,21 @@ char* parseTagDatatoJson(void *p){
...
@@ -5243,20 +5240,21 @@ char* parseTagDatatoJson(void *p){
}
}
int16_t
nCols
=
kvRowNCols
(
p
);
int16_t
nCols
=
kvRowNCols
(
p
);
ASSERT
(
nCols
%
2
==
0
);
ASSERT
(
nCols
%
2
==
1
);
char
tagJsonKey
[
TSDB_MAX_JSON_KEY_LEN
+
1
]
=
{
0
};
char
tagJsonKey
[
TSDB_MAX_JSON_KEY_LEN
+
1
]
=
{
0
};
for
(
int
j
=
0
;
j
<
nCols
;
++
j
)
{
for
(
int
j
=
0
;
j
<
nCols
;
++
j
)
{
SColIdx
*
pColIdx
=
kvRowColIdxAt
(
p
,
j
);
SColIdx
*
pColIdx
=
kvRowColIdxAt
(
p
,
j
);
void
*
val
=
(
kvRowColVal
(
p
,
pColIdx
));
void
*
val
=
(
kvRowColVal
(
p
,
pColIdx
));
if
(
j
==
0
){
if
(
j
==
0
){
int8_t
json
Val
=
*
(
int8_t
*
)
val
;
int8_t
json
PlaceHolder
=
*
(
int8_t
*
)
val
;
ASSERT
(
json
Val
==
TSDB_DATA_JSON_PLACEHOLDER
);
ASSERT
(
json
PlaceHolder
==
TSDB_DATA_JSON_PLACEHOLDER
);
continue
;
continue
;
}
}
else
if
(
j
==
1
){
if
(
j
==
1
&&
*
(
uint8_t
*
)
val
==
TSDB_DATA_JSON_NULL
){
uint8_t
jsonNULL
=
*
(
uint8_t
*
)(
varDataVal
(
val
));
ASSERT
(
jsonNULL
==
TSDB_DATA_JSON_NULL
);
}
else
if
(
j
==
2
&&
*
(
uint8_t
*
)
val
==
TSDB_DATA_JSON_NULL
){
goto
end
;
goto
end
;
}
}
else
if
(
j
%
2
==
1
)
{
// json key encode by binary
if
(
j
%
2
==
0
)
{
// json key encode by binary
ASSERT
(
varDataLen
(
val
)
<=
TSDB_MAX_JSON_KEY_LEN
);
ASSERT
(
varDataLen
(
val
)
<=
TSDB_MAX_JSON_KEY_LEN
);
memset
(
tagJsonKey
,
0
,
sizeof
(
tagJsonKey
));
memset
(
tagJsonKey
,
0
,
sizeof
(
tagJsonKey
));
memcpy
(
tagJsonKey
,
varDataVal
(
val
),
varDataLen
(
val
));
memcpy
(
tagJsonKey
,
varDataVal
(
val
),
varDataLen
(
val
));
...
@@ -5307,14 +5305,18 @@ end:
...
@@ -5307,14 +5305,18 @@ end:
}
}
int
parseJsontoTagData
(
char
*
json
,
SKVRowBuilder
*
kvRowBuilder
,
char
*
errMsg
,
int16_t
startColId
){
int
parseJsontoTagData
(
char
*
json
,
SKVRowBuilder
*
kvRowBuilder
,
char
*
errMsg
,
int16_t
startColId
){
uint8_t
jsonNULL
=
TSDB_DATA_JSON_NULL
;
int
jsonIndex
=
startColId
+
1
;
char
nullTypeKey
[
VARSTR_HEADER_SIZE
+
CHAR_BYTES
]
=
{
0
};
varDataSetLen
(
nullTypeKey
,
CHAR_BYTES
);
*
(
uint8_t
*
)(
varDataVal
(
nullTypeKey
))
=
jsonNULL
;
tdAddColToKVRow
(
kvRowBuilder
,
jsonIndex
++
,
TSDB_DATA_TYPE_JSON
,
nullTypeKey
,
false
);
// add json null type
if
(
strtrim
(
json
)
==
0
||
strcasecmp
(
json
,
"null"
)
==
0
){
if
(
strtrim
(
json
)
==
0
||
strcasecmp
(
json
,
"null"
)
==
0
){
uint8_t
typeVal
=
TSDB_DATA_JSON_NULL
;
tdAddColToKVRow
(
kvRowBuilder
,
jsonIndex
++
,
TSDB_DATA_TYPE_JSON
,
&
jsonNULL
,
false
);
// add json null value
tdAddColToKVRow
(
kvRowBuilder
,
startColId
++
,
TSDB_DATA_TYPE_JSON
,
&
typeVal
,
false
);
// add json type
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
int
jsonIndex
=
++
startColId
;
int8_t
jsonNotNull
=
TSDB_DATA_JSON_NOT_NULL
;
int8_t
typeVal
=
TSDB_DATA_JSON_OBJECT
;
tdAddColToKVRow
(
kvRowBuilder
,
jsonIndex
++
,
TSDB_DATA_TYPE_JSON
,
&
jsonNotNull
,
false
);
// add json type
tdAddColToKVRow
(
kvRowBuilder
,
jsonIndex
++
,
TSDB_DATA_TYPE_JSON
,
&
typeVal
,
false
);
// add json type
cJSON
*
root
=
cJSON_Parse
(
json
);
cJSON
*
root
=
cJSON_Parse
(
json
);
if
(
root
==
NULL
){
if
(
root
==
NULL
){
...
@@ -5399,9 +5401,8 @@ int parseJsontoTagData(char* json, SKVRowBuilder* kvRowBuilder, char* errMsg, in
...
@@ -5399,9 +5401,8 @@ int parseJsontoTagData(char* json, SKVRowBuilder* kvRowBuilder, char* errMsg, in
}
}
}
}
if
(
taosHashGetSize
(
keyHash
)
==
0
){
if
(
taosHashGetSize
(
keyHash
)
==
0
){
// set json NULL true
typeVal
=
TSDB_DATA_JSON_NULL
;
memcpy
(
POINTER_SHIFT
(
kvRowBuilder
->
buf
,
sizeof
(
nullTypeKey
)),
&
jsonNULL
,
CHAR_BYTES
);
memcpy
(
kvRowBuilder
->
buf
,
&
typeVal
,
CHAR_BYTES
);
}
}
end:
end:
...
...
src/common/src/ttypes.c
浏览文件 @
cd73d9ad
...
@@ -510,11 +510,15 @@ void setNullN(void *val, int32_t type, int32_t bytes, int32_t numOfElems) {
...
@@ -510,11 +510,15 @@ void setNullN(void *val, int32_t type, int32_t bytes, int32_t numOfElems) {
break
;
break
;
case
TSDB_DATA_TYPE_NCHAR
:
case
TSDB_DATA_TYPE_NCHAR
:
case
TSDB_DATA_TYPE_BINARY
:
case
TSDB_DATA_TYPE_BINARY
:
case
TSDB_DATA_TYPE_JSON
:
for
(
int32_t
i
=
0
;
i
<
numOfElems
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
numOfElems
;
++
i
)
{
setVardataNull
(
POINTER_SHIFT
(
val
,
i
*
bytes
),
type
);
setVardataNull
(
POINTER_SHIFT
(
val
,
i
*
bytes
),
type
);
}
}
break
;
break
;
case
TSDB_DATA_TYPE_JSON
:
for
(
int32_t
i
=
0
;
i
<
numOfElems
;
++
i
)
{
*
(
uint8_t
*
)(
POINTER_SHIFT
(
val
,
i
*
tDataTypes
[
type
].
bytes
))
=
TSDB_DATA_JSON_NULL
;
}
break
;
default:
{
default:
{
for
(
int32_t
i
=
0
;
i
<
numOfElems
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
numOfElems
;
++
i
)
{
*
(
uint32_t
*
)(
POINTER_SHIFT
(
val
,
i
*
tDataTypes
[
TSDB_DATA_TYPE_INT
].
bytes
))
=
TSDB_DATA_INT_NULL
;
*
(
uint32_t
*
)(
POINTER_SHIFT
(
val
,
i
*
tDataTypes
[
TSDB_DATA_TYPE_INT
].
bytes
))
=
TSDB_DATA_INT_NULL
;
...
...
src/inc/taosdef.h
浏览文件 @
cd73d9ad
...
@@ -73,7 +73,7 @@ extern const int32_t TYPE_BYTES[16];
...
@@ -73,7 +73,7 @@ extern const int32_t TYPE_BYTES[16];
#define TSDB_DATA_BINARY_NULL 0xFF
#define TSDB_DATA_BINARY_NULL 0xFF
#define TSDB_DATA_JSON_PLACEHOLDER 0x7F
#define TSDB_DATA_JSON_PLACEHOLDER 0x7F
#define TSDB_DATA_JSON_NULL 0xFF
#define TSDB_DATA_JSON_NULL 0xFF
#define TSDB_DATA_JSON_
OBJECT
0x01
#define TSDB_DATA_JSON_
NOT_NULL
0x01
#define TSDB_DATA_UTINYINT_NULL 0xFF
#define TSDB_DATA_UTINYINT_NULL 0xFF
#define TSDB_DATA_USMALLINT_NULL 0xFFFF
#define TSDB_DATA_USMALLINT_NULL 0xFFFF
...
...
src/inc/ttype.h
浏览文件 @
cd73d9ad
...
@@ -160,7 +160,7 @@ static FORCE_INLINE bool isNull(const void *val, int32_t type) {
...
@@ -160,7 +160,7 @@ static FORCE_INLINE bool isNull(const void *val, int32_t type) {
case
TSDB_DATA_TYPE_DOUBLE
:
case
TSDB_DATA_TYPE_DOUBLE
:
return
*
(
uint64_t
*
)
val
==
TSDB_DATA_DOUBLE_NULL
;
return
*
(
uint64_t
*
)
val
==
TSDB_DATA_DOUBLE_NULL
;
case
TSDB_DATA_TYPE_JSON
:
case
TSDB_DATA_TYPE_JSON
:
return
varDataLen
(
val
)
==
sizeof
(
int8_t
)
&&
*
(
uint8_t
*
)
varDataVal
(
val
)
==
TSDB_DATA_JSON_NULL
;
return
*
(
uint8_t
*
)
val
==
TSDB_DATA_JSON_NULL
;
case
TSDB_DATA_TYPE_NCHAR
:
case
TSDB_DATA_TYPE_NCHAR
:
return
varDataLen
(
val
)
==
sizeof
(
int32_t
)
&&
*
(
uint32_t
*
)
varDataVal
(
val
)
==
TSDB_DATA_NCHAR_NULL
;
return
varDataLen
(
val
)
==
sizeof
(
int32_t
)
&&
*
(
uint32_t
*
)
varDataVal
(
val
)
==
TSDB_DATA_NCHAR_NULL
;
case
TSDB_DATA_TYPE_BINARY
:
case
TSDB_DATA_TYPE_BINARY
:
...
...
src/tsdb/src/tsdbMeta.c
浏览文件 @
cd73d9ad
...
@@ -1100,22 +1100,26 @@ static int tsdbAddTableIntoIndex(STsdbMeta *pMeta, STable *pTable, bool refSuper
...
@@ -1100,22 +1100,26 @@ static int tsdbAddTableIntoIndex(STsdbMeta *pMeta, STable *pTable, bool refSuper
if
(
pSTable
->
tagSchema
->
columns
[
0
].
type
==
TSDB_DATA_TYPE_JSON
){
if
(
pSTable
->
tagSchema
->
columns
[
0
].
type
==
TSDB_DATA_TYPE_JSON
){
ASSERT
(
pSTable
->
tagSchema
->
numOfCols
==
1
);
ASSERT
(
pSTable
->
tagSchema
->
numOfCols
==
1
);
int16_t
nCols
=
kvRowNCols
(
pTable
->
tagVal
);
int16_t
nCols
=
kvRowNCols
(
pTable
->
tagVal
);
ASSERT
(
nCols
%
2
==
0
);
ASSERT
(
nCols
%
2
==
1
);
void
*
jsonTypeKey
=
NULL
;
for
(
int
j
=
0
;
j
<
nCols
;
++
j
)
{
for
(
int
j
=
0
;
j
<
nCols
;
++
j
)
{
if
(
j
!=
0
&&
j
!=
1
&&
j
%
2
!
=
0
)
continue
;
// jump value
if
(
j
!=
0
&&
j
!=
2
&&
j
%
2
=
=
0
)
continue
;
// jump value
SColIdx
*
pColIdx
=
kvRowColIdxAt
(
pTable
->
tagVal
,
j
);
SColIdx
*
pColIdx
=
kvRowColIdxAt
(
pTable
->
tagVal
,
j
);
void
*
val
=
(
kvRowColVal
(
pTable
->
tagVal
,
pColIdx
));
void
*
val
=
(
kvRowColVal
(
pTable
->
tagVal
,
pColIdx
));
if
(
j
==
0
){
// json value is the first
if
(
j
==
0
){
// json value is the first
int8_t
json
Val
=
*
(
int8_t
*
)
val
;
int8_t
json
PlaceHolder
=
*
(
int8_t
*
)
val
;
ASSERT
(
json
Val
==
TSDB_DATA_JSON_PLACEHOLDER
);
ASSERT
(
json
PlaceHolder
==
TSDB_DATA_JSON_PLACEHOLDER
);
continue
;
continue
;
}
}
if
(
j
==
1
){
char
nullData
[
VARSTR_HEADER_SIZE
+
CHAR_BYTES
]
=
{
0
};
uint8_t
jsonNULL
=
*
(
uint8_t
*
)(
varDataVal
(
val
));
if
(
j
==
1
&&
*
(
uint8_t
*
)
val
==
TSDB_DATA_JSON_NULL
){
// for null json data, add index to jsonKeyMap
ASSERT
(
jsonNULL
==
TSDB_DATA_JSON_NULL
);
varDataSetLen
(
nullData
,
CHAR_BYTES
);
jsonTypeKey
=
val
;
*
(
uint8_t
*
)(
varDataVal
(
nullData
))
=
TSDB_DATA_JSON_NULL
;
continue
;
val
=
nullData
;
}
if
(
j
==
2
){
if
(
*
(
uint8_t
*
)
val
==
TSDB_DATA_JSON_NOT_NULL
)
continue
;
else
val
=
jsonTypeKey
;
}
}
char
keyMd5
[
TSDB_MAX_JSON_KEY_MD5_LEN
]
=
{
0
};
char
keyMd5
[
TSDB_MAX_JSON_KEY_MD5_LEN
]
=
{
0
};
...
@@ -1180,16 +1184,27 @@ static int tsdbRemoveTableFromIndex(STsdbMeta *pMeta, STable *pTable) {
...
@@ -1180,16 +1184,27 @@ static int tsdbRemoveTableFromIndex(STsdbMeta *pMeta, STable *pTable) {
if
(
pSTable
->
tagSchema
->
columns
[
0
].
type
==
TSDB_DATA_TYPE_JSON
){
if
(
pSTable
->
tagSchema
->
columns
[
0
].
type
==
TSDB_DATA_TYPE_JSON
){
ASSERT
(
pSTable
->
tagSchema
->
numOfCols
==
1
);
ASSERT
(
pSTable
->
tagSchema
->
numOfCols
==
1
);
int16_t
nCols
=
kvRowNCols
(
pTable
->
tagVal
);
int16_t
nCols
=
kvRowNCols
(
pTable
->
tagVal
);
ASSERT
(
nCols
%
2
==
0
);
ASSERT
(
nCols
%
2
==
1
);
void
*
jsonTypeKey
=
NULL
;
for
(
int
j
=
0
;
j
<
nCols
;
++
j
)
{
for
(
int
j
=
0
;
j
<
nCols
;
++
j
)
{
if
(
j
!=
0
&&
j
%
2
!
=
0
)
continue
;
// jump value
if
(
j
!=
0
&&
j
!=
2
&&
j
%
2
=
=
0
)
continue
;
// jump value
SColIdx
*
pColIdx
=
kvRowColIdxAt
(
pTable
->
tagVal
,
j
);
SColIdx
*
pColIdx
=
kvRowColIdxAt
(
pTable
->
tagVal
,
j
);
void
*
val
=
(
kvRowColVal
(
pTable
->
tagVal
,
pColIdx
));
void
*
val
=
(
kvRowColVal
(
pTable
->
tagVal
,
pColIdx
));
if
(
j
==
0
){
// json value is the first
if
(
j
==
0
){
// json value is the first
int8_t
json
Val
=
*
(
int8_t
*
)
val
;
int8_t
json
PlaceHolder
=
*
(
int8_t
*
)
val
;
ASSERT
(
json
Val
==
TSDB_DATA_JSON_PLACEHOLDER
);
ASSERT
(
json
PlaceHolder
==
TSDB_DATA_JSON_PLACEHOLDER
);
continue
;
continue
;
}
}
if
(
j
==
1
){
uint8_t
jsonNULL
=
*
(
uint8_t
*
)(
varDataVal
(
val
));
ASSERT
(
jsonNULL
==
TSDB_DATA_JSON_NULL
);
jsonTypeKey
=
val
;
continue
;
}
if
(
j
==
2
){
if
(
*
(
uint8_t
*
)
val
==
TSDB_DATA_JSON_NOT_NULL
)
continue
;
else
val
=
jsonTypeKey
;
}
SArray
**
tablist
=
(
SArray
**
)
taosHashGet
(
pSTable
->
jsonKeyMap
,
varDataVal
(
val
)
,
varDataLen
(
val
));
SArray
**
tablist
=
(
SArray
**
)
taosHashGet
(
pSTable
->
jsonKeyMap
,
varDataVal
(
val
)
,
varDataLen
(
val
));
if
(
tablist
==
NULL
)
{
if
(
tablist
==
NULL
)
{
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
cd73d9ad
...
@@ -4087,13 +4087,7 @@ static FORCE_INLINE int32_t tsdbGetJsonTagDataFromId(void *param, int32_t id, ch
...
@@ -4087,13 +4087,7 @@ static FORCE_INLINE int32_t tsdbGetJsonTagDataFromId(void *param, int32_t id, ch
if
(
id
==
TSDB_TBNAME_COLUMN_INDEX
)
{
if
(
id
==
TSDB_TBNAME_COLUMN_INDEX
)
{
*
data
=
TABLE_NAME
(
pTable
);
*
data
=
TABLE_NAME
(
pTable
);
}
else
{
}
else
{
int16_t
colId
=
0
;
void
*
jsonData
=
getJsonTagValue
(
pTable
,
name
,
TSDB_MAX_JSON_KEY_MD5_LEN
,
NULL
);
void
*
jsonData
=
getJsonTagValue
(
pTable
,
name
,
TSDB_MAX_JSON_KEY_MD5_LEN
,
&
colId
);
if
(
colId
==
id
+
1
){
// if find json tag is NULL
if
(
jsonData
!=
NULL
)
*
data
=
NULL
;
else
*
data
=
pTable
;
return
TSDB_CODE_SUCCESS
;
}
// jsonData == NULL for ? operation
// jsonData == NULL for ? operation
if
(
jsonData
!=
NULL
)
jsonData
+=
CHAR_BYTES
;
// jump type
if
(
jsonData
!=
NULL
)
jsonData
+=
CHAR_BYTES
;
// jump type
*
data
=
jsonData
;
*
data
=
jsonData
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录