Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f7dac922
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
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,发现更多精彩内容 >>
未验证
提交
f7dac922
编写于
3月 08, 2022
作者:
S
shenglian-zhou
提交者:
GitHub
3月 08, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #10631 from taosdata/fix_win_comp_error
fix window compilation error
上级
b934af13
4ae15d76
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
9 deletion
+9
-9
src/common/src/texpr.c
src/common/src/texpr.c
+9
-9
未找到文件。
src/common/src/texpr.c
浏览文件 @
f7dac922
...
...
@@ -1364,7 +1364,7 @@ int32_t exprValidateTimeNode(char *msgbuf, tExprNode *pExpr) {
}
char
fraction
[
32
]
=
{
0
};
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
&&
tsDigits
!=
TSDB_TIME_PRECISION_MILLI_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MICRO_DIGITS
&&
...
...
@@ -1444,7 +1444,7 @@ int32_t exprValidateTimeNode(char *msgbuf, tExprNode *pExpr) {
if
(
child0
->
pVal
->
nType
==
TSDB_DATA_TYPE_BIGINT
)
{
char
fraction
[
32
]
=
{
0
};
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
&&
tsDigits
!=
TSDB_TIME_PRECISION_MILLI_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MICRO_DIGITS
&&
...
...
@@ -1525,7 +1525,7 @@ int32_t exprValidateTimeNode(char *msgbuf, tExprNode *pExpr) {
if
(
child
[
i
]
->
pVal
->
nType
==
TSDB_DATA_TYPE_BIGINT
)
{
char
fraction
[
32
]
=
{
0
};
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
&&
tsDigits
!=
TSDB_TIME_PRECISION_MILLI_DIGITS
&&
tsDigits
!=
TSDB_TIME_PRECISION_MICRO_DIGITS
&&
...
...
@@ -2234,7 +2234,7 @@ void convertStringToTimestamp(int16_t type, char *inputData, int64_t timePrec, i
if
(
type
==
TSDB_DATA_TYPE_BINARY
)
{
newColData
=
calloc
(
1
,
charLen
+
1
);
memcpy
(
newColData
,
varDataVal
(
inputData
),
charLen
);
taosParseTime
(
newColData
,
timeVal
,
charLen
,
timePrec
,
0
);
taosParseTime
(
newColData
,
timeVal
,
charLen
,
(
int32_t
)
timePrec
,
0
);
tfree
(
newColData
);
}
else
if
(
type
==
TSDB_DATA_TYPE_NCHAR
)
{
newColData
=
calloc
(
1
,
charLen
/
TSDB_NCHAR_SIZE
+
1
);
...
...
@@ -2245,7 +2245,7 @@ void convertStringToTimestamp(int16_t type, char *inputData, int64_t timePrec, i
return
;
}
newColData
[
len
]
=
0
;
taosParseTime
(
newColData
,
timeVal
,
len
+
1
,
timePrec
,
0
);
taosParseTime
(
newColData
,
timeVal
,
len
+
1
,
(
int32_t
)
timePrec
,
0
);
tfree
(
newColData
);
}
else
{
uError
(
"input type should be binary/nchar string"
);
...
...
@@ -2304,7 +2304,7 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn
char
fraction
[
20
]
=
{
0
};
bool
hasFraction
=
false
;
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
};
int64_t
timeVal
;
...
...
@@ -2328,7 +2328,7 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn
int32_t
len
=
(
int32_t
)
strlen
(
buf
);
if
(
hasFraction
)
{
int32_t
fracLen
=
strlen
(
fraction
)
+
1
;
int32_t
fracLen
=
(
int32_t
)
strlen
(
fraction
)
+
1
;
char
*
tzInfo
=
strchr
(
buf
,
'+'
);
if
(
tzInfo
)
{
memmove
(
tzInfo
+
fracLen
,
tzInfo
,
strlen
(
tzInfo
));
...
...
@@ -2399,7 +2399,7 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn
char
buf
[
20
]
=
{
0
};
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
;
switch
(
timeUnit
)
{
case
0
:
{
/* 1u */
...
...
@@ -2572,7 +2572,7 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn
}
char
buf
[
20
]
=
{
0
};
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
)
{
timeVal
[
j
]
=
timeVal
[
j
]
*
1000000000
;
}
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录