Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6caa22d2
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6caa22d2
编写于
11月 18, 2022
作者:
K
kailixu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'feat/TS-1883-2.6' of github.com:taosdata/TDengine into feat/TS-1883-2.6
上级
90e47f72
5b4be618
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
27 addition
and
27 deletion
+27
-27
src/common/inc/tdataformat.h
src/common/inc/tdataformat.h
+4
-4
src/common/src/tdataformat.c
src/common/src/tdataformat.c
+5
-5
src/common/src/texpr.c
src/common/src/texpr.c
+2
-2
src/common/src/tname.c
src/common/src/tname.c
+1
-1
src/inc/taosmsg.h
src/inc/taosmsg.h
+12
-12
src/kit/shell/src/shellEngine.c
src/kit/shell/src/shellEngine.c
+3
-3
未找到文件。
src/common/inc/tdataformat.h
浏览文件 @
6caa22d2
...
...
@@ -121,7 +121,7 @@ typedef struct {
int
tdInitTSchemaBuilder
(
STSchemaBuilder
*
pBuilder
,
int32_t
version
);
void
tdDestroyTSchemaBuilder
(
STSchemaBuilder
*
pBuilder
);
void
tdResetTSchemaBuilder
(
STSchemaBuilder
*
pBuilder
,
int32_t
version
);
int
tdAddColToSchema
(
STSchemaBuilder
*
pBuilder
,
int8_t
type
,
int16_t
colId
,
int16_t
bytes
);
int
tdAddColToSchema
(
STSchemaBuilder
*
pBuilder
,
int8_t
type
,
int16_t
colId
,
u
int16_t
bytes
);
STSchema
*
tdGetSchemaFromBuilder
(
STSchemaBuilder
*
pBuilder
);
// ----------------- Semantic timestamp key definition
...
...
@@ -262,9 +262,9 @@ static FORCE_INLINE bool tdIsColOfRowNullBySchema(SDataRow row, STSchema *pSchem
}
static
FORCE_INLINE
void
tdSetColOfRowNullBySchema
(
SDataRow
row
,
STSchema
*
pSchema
,
int
idx
)
{
int16_t
offset
=
TD_DATA_ROW_HEAD_SIZE
+
pSchema
->
columns
[
idx
].
offset
;
int8_t
type
=
pSchema
->
columns
[
idx
].
type
;
int16_t
bytes
=
pSchema
->
columns
[
idx
].
bytes
;
u
int16_t
offset
=
TD_DATA_ROW_HEAD_SIZE
+
pSchema
->
columns
[
idx
].
offset
;
int8_t
type
=
pSchema
->
columns
[
idx
].
type
;
u
int16_t
bytes
=
pSchema
->
columns
[
idx
].
bytes
;
setNull
(
tdGetRowDataOfCol
(
row
,
type
,
offset
),
type
,
bytes
);
}
...
...
src/common/src/tdataformat.c
浏览文件 @
6caa22d2
...
...
@@ -91,12 +91,12 @@ void *tdDecodeSchema(void *buf, STSchema **pRSchema) {
if
(
tdInitTSchemaBuilder
(
&
schemaBuilder
,
version
)
<
0
)
return
NULL
;
for
(
int
i
=
0
;
i
<
numOfCols
;
i
++
)
{
int8_t
type
=
0
;
int16_t
colId
=
0
;
int16_t
bytes
=
0
;
int8_t
type
=
0
;
int16_t
colId
=
0
;
u
int16_t
bytes
=
0
;
buf
=
taosDecodeFixedI8
(
buf
,
&
type
);
buf
=
taosDecodeFixedI16
(
buf
,
&
colId
);
buf
=
taosDecodeFixed
I
16
(
buf
,
&
bytes
);
buf
=
taosDecodeFixed
U
16
(
buf
,
&
bytes
);
if
(
tdAddColToSchema
(
&
schemaBuilder
,
type
,
colId
,
bytes
)
<
0
)
{
tdDestroyTSchemaBuilder
(
&
schemaBuilder
);
return
NULL
;
...
...
@@ -133,7 +133,7 @@ void tdResetTSchemaBuilder(STSchemaBuilder *pBuilder, int32_t version) {
pBuilder
->
version
=
version
;
}
int
tdAddColToSchema
(
STSchemaBuilder
*
pBuilder
,
int8_t
type
,
int16_t
colId
,
int16_t
bytes
)
{
int
tdAddColToSchema
(
STSchemaBuilder
*
pBuilder
,
int8_t
type
,
int16_t
colId
,
u
int16_t
bytes
)
{
if
(
!
isValidDataType
(
type
))
return
-
1
;
if
(
pBuilder
->
nCols
>=
pBuilder
->
tCols
)
{
...
...
src/common/src/texpr.c
浏览文件 @
6caa22d2
...
...
@@ -384,7 +384,7 @@ static uint8_t UNUSED_FUNC isQueryOnPrimaryKey(const char *primaryColumnName, co
}
}
static
void
reverseCopy
(
char
*
dest
,
const
char
*
src
,
int16_t
type
,
int32_t
numOfRows
,
int16_t
colSize
)
{
static
void
reverseCopy
(
char
*
dest
,
const
char
*
src
,
int16_t
type
,
int32_t
numOfRows
,
u
int16_t
colSize
)
{
switch
(
type
)
{
case
TSDB_DATA_TYPE_TINYINT
:
case
TSDB_DATA_TYPE_UTINYINT
:{
...
...
@@ -2054,7 +2054,7 @@ void vectorLength(int16_t functionId, tExprOperandInfo *pInputs, int32_t numInpu
}
}
void
castConvert
(
int16_t
inputType
,
int16_t
inputBytes
,
char
*
input
,
int16_t
OutputType
,
int16_t
outputBytes
,
char
*
output
)
{
void
castConvert
(
int16_t
inputType
,
uint16_t
inputBytes
,
char
*
input
,
int16_t
OutputType
,
u
int16_t
outputBytes
,
char
*
output
)
{
switch
(
OutputType
)
{
case
TSDB_DATA_TYPE_BIGINT
:
if
(
inputType
==
TSDB_DATA_TYPE_BINARY
)
{
...
...
src/common/src/tname.c
浏览文件 @
6caa22d2
...
...
@@ -39,7 +39,7 @@ SSchema tGetUserSpecifiedColumnSchema(tVariant* pVal, SStrToken* exprStr, const
s
.
type
=
pVal
->
nType
;
if
(
s
.
type
==
TSDB_DATA_TYPE_BINARY
||
s
.
type
==
TSDB_DATA_TYPE_NCHAR
)
{
s
.
bytes
=
(
int16_t
)(
pVal
->
nLen
+
VARSTR_HEADER_SIZE
);
s
.
bytes
=
(
u
int16_t
)(
pVal
->
nLen
+
VARSTR_HEADER_SIZE
);
}
else
{
s
.
bytes
=
tDataTypes
[
pVal
->
nType
].
bytes
;
}
...
...
src/inc/taosmsg.h
浏览文件 @
6caa22d2
...
...
@@ -335,18 +335,18 @@ typedef struct {
}
SAlterTableMsg
;
typedef
struct
{
SMsgHead
head
;
int8_t
extend
;
int64_t
uid
;
int32_t
tid
;
int16_t
tversion
;
int16_t
colId
;
int8_t
type
;
int16_t
bytes
;
int32_t
tagValLen
;
int16_t
numOfTags
;
int32_t
schemaLen
;
char
data
[];
SMsgHead
head
;
int8_t
extend
;
int64_t
uid
;
int32_t
tid
;
int16_t
tversion
;
int16_t
colId
;
int8_t
type
;
uint16_t
bytes
;
int32_t
tagValLen
;
int16_t
numOfTags
;
int32_t
schemaLen
;
char
data
[];
}
SUpdateTableTagValMsg
;
typedef
struct
{
...
...
src/kit/shell/src/shellEngine.c
浏览文件 @
6caa22d2
...
...
@@ -872,7 +872,7 @@ static int calcColWidth(TAOS_FIELD* field, int precision) {
case
TSDB_DATA_TYPE_NCHAR
:
case
TSDB_DATA_TYPE_JSON
:{
int
16
_t
bytes
=
field
->
bytes
*
TSDB_NCHAR_SIZE
;
int
32
_t
bytes
=
field
->
bytes
*
TSDB_NCHAR_SIZE
;
if
(
bytes
>
tsMaxBinaryDisplayWidth
)
{
return
MAX
(
tsMaxBinaryDisplayWidth
,
width
);
}
else
{
...
...
@@ -1453,7 +1453,7 @@ TAOS_FIELD *wsclient_print_header(cJSON *query, int *pcols, int *pprecison) {
for
(
int
i
=
0
;
i
<
(
int
)
fields_count
->
valueint
;
i
++
)
{
strncpy
(
fields
[
i
].
name
,
cJSON_GetArrayItem
(
fields_names
,
i
)
->
valuestring
,
65
);
fields
[
i
].
type
=
(
uint8_t
)
cJSON_GetArrayItem
(
fields_types
,
i
)
->
valueint
;
fields
[
i
].
bytes
=
(
int16_t
)
cJSON_GetArrayItem
(
fields_lengths
,
i
)
->
valueint
;
fields
[
i
].
bytes
=
(
u
int16_t
)
cJSON_GetArrayItem
(
fields_lengths
,
i
)
->
valueint
;
}
cJSON
*
precision
=
cJSON_GetObjectItem
(
query
,
"precision"
);
if
(
cJSON_IsNumber
(
precision
))
{
...
...
@@ -1610,7 +1610,7 @@ void wsclient_query(char *command) {
cJSON
*
lengths
=
cJSON_GetObjectItem
(
fetch
,
"lengths"
);
if
(
cJSON_IsArray
(
lengths
))
{
for
(
int
i
=
0
;
i
<
cols
;
i
++
)
{
fields
[
i
].
bytes
=
(
int16_t
)(
cJSON_GetArrayItem
(
lengths
,
i
)
->
valueint
);
fields
[
i
].
bytes
=
(
u
int16_t
)(
cJSON_GetArrayItem
(
lengths
,
i
)
->
valueint
);
}
if
(
showed_rows
<
DEFAULT_RES_SHOW_NUM
)
{
if
(
wsclient_send_sql
(
NULL
,
WS_FETCH_BLOCK
,
(
int
)
id
->
valueint
)
==
0
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录