Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
75b3f549
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
75b3f549
编写于
3月 09, 2022
作者:
P
Ping Xiao
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into xiaoping/cases
上级
0306a977
fb80b74d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
10 deletion
+10
-10
documentation20/cn/00.index/docs.md
documentation20/cn/00.index/docs.md
+1
-1
src/common/src/texpr.c
src/common/src/texpr.c
+9
-9
未找到文件。
documentation20/cn/00.index/docs.md
浏览文件 @
75b3f549
...
@@ -95,7 +95,7 @@ TDengine 是一个高效的存储、查询、分析时序大数据的平台,
...
@@ -95,7 +95,7 @@ TDengine 是一个高效的存储、查询、分析时序大数据的平台,
-
[
Grafana
](
/connections#grafana
)
:获取并可视化保存在 TDengine 的数据
-
[
Grafana
](
/connections#grafana
)
:获取并可视化保存在 TDengine 的数据
-
[
IDEA Database
](
https://www.taosdata.com/blog/2020/08/27/1767.html
)
:通过 IDEA 数据库管理工具可视化使用 TDengine
-
[
IDEA Database
](
https://www.taosdata.com/blog/2020/08/27/1767.html
)
:通过 IDEA 数据库管理工具可视化使用 TDengine
-
[
TDengineGUI
](
https://github.com/skye0207/TDengineGUI
)
:基于 Electron 开发的跨平台 TDengine 图形化管理工具
-
[
TDengineGUI
](
https://github.com/skye0207/TDengineGUI
)
:基于 Electron 开发的跨平台 TDengine 图形化管理工具
-
[
DataX
](
https://www.taosdata.com/blog/2021/10/26/3156.html
)
:支持 TDen
ing
e 和其他数据库之间进行数据迁移的工具
-
[
DataX
](
https://www.taosdata.com/blog/2021/10/26/3156.html
)
:支持 TDen
gin
e 和其他数据库之间进行数据迁移的工具
## [TDengine 集群的安装、管理](/cluster)
## [TDengine 集群的安装、管理](/cluster)
...
...
src/common/src/texpr.c
浏览文件 @
75b3f549
...
@@ -1364,7 +1364,7 @@ int32_t exprValidateTimeNode(char *msgbuf, tExprNode *pExpr) {
...
@@ -1364,7 +1364,7 @@ int32_t exprValidateTimeNode(char *msgbuf, tExprNode *pExpr) {
}
}
char
fraction
[
32
]
=
{
0
};
char
fraction
[
32
]
=
{
0
};
NUM_TO_STRING
(
child
->
resultType
,
&
child
->
pVal
->
i64
,
sizeof
(
fraction
),
fraction
);
NUM_TO_STRING
(
child
->
resultType
,
&
child
->
pVal
->
i64
,
sizeof
(
fraction
),
fraction
);
int32_t
tsDigits
=
strlen
(
fraction
);
int32_t
tsDigits
=
(
int32_t
)
strlen
(
fraction
);
if
(
tsDigits
>
TSDB_TIME_PRECISION_SEC_DIGITS
&&
if
(
tsDigits
>
TSDB_TIME_PRECISION_SEC_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MILLI_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MILLI_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MICRO_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MICRO_DIGITS
&&
...
@@ -1444,7 +1444,7 @@ int32_t exprValidateTimeNode(char *msgbuf, tExprNode *pExpr) {
...
@@ -1444,7 +1444,7 @@ int32_t exprValidateTimeNode(char *msgbuf, tExprNode *pExpr) {
if
(
child0
->
pVal
->
nType
==
TSDB_DATA_TYPE_BIGINT
)
{
if
(
child0
->
pVal
->
nType
==
TSDB_DATA_TYPE_BIGINT
)
{
char
fraction
[
32
]
=
{
0
};
char
fraction
[
32
]
=
{
0
};
NUM_TO_STRING
(
child0
->
resultType
,
&
child0
->
pVal
->
i64
,
sizeof
(
fraction
),
fraction
);
NUM_TO_STRING
(
child0
->
resultType
,
&
child0
->
pVal
->
i64
,
sizeof
(
fraction
),
fraction
);
int32_t
tsDigits
=
strlen
(
fraction
);
int32_t
tsDigits
=
(
int32_t
)
strlen
(
fraction
);
if
(
tsDigits
>
TSDB_TIME_PRECISION_SEC_DIGITS
&&
if
(
tsDigits
>
TSDB_TIME_PRECISION_SEC_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MILLI_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MILLI_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MICRO_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MICRO_DIGITS
&&
...
@@ -1525,7 +1525,7 @@ int32_t exprValidateTimeNode(char *msgbuf, tExprNode *pExpr) {
...
@@ -1525,7 +1525,7 @@ int32_t exprValidateTimeNode(char *msgbuf, tExprNode *pExpr) {
if
(
child
[
i
]
->
pVal
->
nType
==
TSDB_DATA_TYPE_BIGINT
)
{
if
(
child
[
i
]
->
pVal
->
nType
==
TSDB_DATA_TYPE_BIGINT
)
{
char
fraction
[
32
]
=
{
0
};
char
fraction
[
32
]
=
{
0
};
NUM_TO_STRING
(
child
[
i
]
->
resultType
,
&
child
[
i
]
->
pVal
->
i64
,
sizeof
(
fraction
),
fraction
);
NUM_TO_STRING
(
child
[
i
]
->
resultType
,
&
child
[
i
]
->
pVal
->
i64
,
sizeof
(
fraction
),
fraction
);
int32_t
tsDigits
=
strlen
(
fraction
);
int32_t
tsDigits
=
(
int32_t
)
strlen
(
fraction
);
if
(
tsDigits
>
TSDB_TIME_PRECISION_SEC_DIGITS
&&
if
(
tsDigits
>
TSDB_TIME_PRECISION_SEC_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MILLI_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MILLI_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MICRO_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MICRO_DIGITS
&&
...
@@ -2234,7 +2234,7 @@ void convertStringToTimestamp(int16_t type, char *inputData, int64_t timePrec, i
...
@@ -2234,7 +2234,7 @@ void convertStringToTimestamp(int16_t type, char *inputData, int64_t timePrec, i
if
(
type
==
TSDB_DATA_TYPE_BINARY
)
{
if
(
type
==
TSDB_DATA_TYPE_BINARY
)
{
newColData
=
calloc
(
1
,
charLen
+
1
);
newColData
=
calloc
(
1
,
charLen
+
1
);
memcpy
(
newColData
,
varDataVal
(
inputData
),
charLen
);
memcpy
(
newColData
,
varDataVal
(
inputData
),
charLen
);
taosParseTime
(
newColData
,
timeVal
,
charLen
,
timePrec
,
0
);
taosParseTime
(
newColData
,
timeVal
,
charLen
,
(
int32_t
)
timePrec
,
0
);
tfree
(
newColData
);
tfree
(
newColData
);
}
else
if
(
type
==
TSDB_DATA_TYPE_NCHAR
)
{
}
else
if
(
type
==
TSDB_DATA_TYPE_NCHAR
)
{
newColData
=
calloc
(
1
,
charLen
/
TSDB_NCHAR_SIZE
+
1
);
newColData
=
calloc
(
1
,
charLen
/
TSDB_NCHAR_SIZE
+
1
);
...
@@ -2245,7 +2245,7 @@ void convertStringToTimestamp(int16_t type, char *inputData, int64_t timePrec, i
...
@@ -2245,7 +2245,7 @@ void convertStringToTimestamp(int16_t type, char *inputData, int64_t timePrec, i
return
;
return
;
}
}
newColData
[
len
]
=
0
;
newColData
[
len
]
=
0
;
taosParseTime
(
newColData
,
timeVal
,
len
+
1
,
timePrec
,
0
);
taosParseTime
(
newColData
,
timeVal
,
len
+
1
,
(
int32_t
)
timePrec
,
0
);
tfree
(
newColData
);
tfree
(
newColData
);
}
else
{
}
else
{
uError
(
"input type should be binary/nchar string"
);
uError
(
"input type should be binary/nchar string"
);
...
@@ -2304,7 +2304,7 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn
...
@@ -2304,7 +2304,7 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn
char
fraction
[
20
]
=
{
0
};
char
fraction
[
20
]
=
{
0
};
bool
hasFraction
=
false
;
bool
hasFraction
=
false
;
NUM_TO_STRING
(
pInputs
[
0
].
type
,
inputData
[
0
],
sizeof
(
fraction
),
fraction
);
NUM_TO_STRING
(
pInputs
[
0
].
type
,
inputData
[
0
],
sizeof
(
fraction
),
fraction
);
int32_t
tsDigits
=
strlen
(
fraction
);
int32_t
tsDigits
=
(
int32_t
)
strlen
(
fraction
);
char
buf
[
64
]
=
{
0
};
char
buf
[
64
]
=
{
0
};
int64_t
timeVal
;
int64_t
timeVal
;
...
@@ -2328,7 +2328,7 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn
...
@@ -2328,7 +2328,7 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn
int32_t
len
=
(
int32_t
)
strlen
(
buf
);
int32_t
len
=
(
int32_t
)
strlen
(
buf
);
if
(
hasFraction
)
{
if
(
hasFraction
)
{
int32_t
fracLen
=
strlen
(
fraction
)
+
1
;
int32_t
fracLen
=
(
int32_t
)
strlen
(
fraction
)
+
1
;
char
*
tzInfo
=
strchr
(
buf
,
'+'
);
char
*
tzInfo
=
strchr
(
buf
,
'+'
);
if
(
tzInfo
)
{
if
(
tzInfo
)
{
memmove
(
tzInfo
+
fracLen
,
tzInfo
,
strlen
(
tzInfo
));
memmove
(
tzInfo
+
fracLen
,
tzInfo
,
strlen
(
tzInfo
));
...
@@ -2399,7 +2399,7 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn
...
@@ -2399,7 +2399,7 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn
char
buf
[
20
]
=
{
0
};
char
buf
[
20
]
=
{
0
};
NUM_TO_STRING
(
TSDB_DATA_TYPE_BIGINT
,
&
timeVal
,
sizeof
(
buf
),
buf
);
NUM_TO_STRING
(
TSDB_DATA_TYPE_BIGINT
,
&
timeVal
,
sizeof
(
buf
),
buf
);
int32_t
tsDigits
=
strlen
(
buf
);
int32_t
tsDigits
=
(
int32_t
)
strlen
(
buf
);
timeUnit
=
timeUnit
*
1000
/
factor
;
timeUnit
=
timeUnit
*
1000
/
factor
;
switch
(
timeUnit
)
{
switch
(
timeUnit
)
{
case
0
:
{
/* 1u */
case
0
:
{
/* 1u */
...
@@ -2572,7 +2572,7 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn
...
@@ -2572,7 +2572,7 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn
}
}
char
buf
[
20
]
=
{
0
};
char
buf
[
20
]
=
{
0
};
NUM_TO_STRING
(
TSDB_DATA_TYPE_BIGINT
,
&
timeVal
[
j
],
sizeof
(
buf
),
buf
);
NUM_TO_STRING
(
TSDB_DATA_TYPE_BIGINT
,
&
timeVal
[
j
],
sizeof
(
buf
),
buf
);
int32_t
tsDigits
=
strlen
(
buf
);
int32_t
tsDigits
=
(
int32_t
)
strlen
(
buf
);
if
(
tsDigits
<=
TSDB_TIME_PRECISION_SEC_DIGITS
)
{
if
(
tsDigits
<=
TSDB_TIME_PRECISION_SEC_DIGITS
)
{
timeVal
[
j
]
=
timeVal
[
j
]
*
1000000000
;
timeVal
[
j
]
=
timeVal
[
j
]
*
1000000000
;
}
else
if
(
tsDigits
==
TSDB_TIME_PRECISION_MILLI_DIGITS
)
{
}
else
if
(
tsDigits
==
TSDB_TIME_PRECISION_MILLI_DIGITS
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录