Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
398c3e79
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
398c3e79
编写于
7月 11, 2020
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-225] refactor codes.
上级
4a7d25c8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
11 deletion
+15
-11
src/common/src/tglobal.c
src/common/src/tglobal.c
+1
-1
src/common/src/tname.c
src/common/src/tname.c
+1
-1
src/query/inc/qtsbuf.h
src/query/inc/qtsbuf.h
+1
-1
src/util/src/ttime.c
src/util/src/ttime.c
+12
-8
未找到文件。
src/common/src/tglobal.c
浏览文件 @
398c3e79
...
@@ -560,7 +560,7 @@ static void doInitGlobalConfig() {
...
@@ -560,7 +560,7 @@ static void doInitGlobalConfig() {
cfg
.
ptr
=
&
tsMinIntervalTime
;
cfg
.
ptr
=
&
tsMinIntervalTime
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
1
0
;
cfg
.
minValue
=
1
;
cfg
.
maxValue
=
1000000
;
cfg
.
maxValue
=
1000000
;
cfg
.
ptrLength
=
0
;
cfg
.
ptrLength
=
0
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_MS
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_MS
;
...
...
src/common/src/tname.c
浏览文件 @
398c3e79
...
@@ -82,7 +82,7 @@ int64_t taosGetIntervalStartTimestamp(int64_t startTime, int64_t slidingTime, in
...
@@ -82,7 +82,7 @@ int64_t taosGetIntervalStartTimestamp(int64_t startTime, int64_t slidingTime, in
}
}
int64_t
start
=
((
startTime
-
intervalTime
)
/
slidingTime
+
1
)
*
slidingTime
;
int64_t
start
=
((
startTime
-
intervalTime
)
/
slidingTime
+
1
)
*
slidingTime
;
if
(
!
(
timeUnit
==
'a'
||
timeUnit
==
'm'
||
timeUnit
==
's'
||
timeUnit
==
'h'
))
{
if
(
!
(
timeUnit
==
'
u'
||
timeUnit
==
'
a'
||
timeUnit
==
'm'
||
timeUnit
==
's'
||
timeUnit
==
'h'
))
{
/*
/*
* here we revised the start time of day according to the local time zone,
* here we revised the start time of day according to the local time zone,
* but in case of DST, the start time of one day need to be dynamically decided.
* but in case of DST, the start time of one day need to be dynamically decided.
...
...
src/query/inc/qtsbuf.h
浏览文件 @
398c3e79
...
@@ -107,7 +107,7 @@ STSBuf* tsBufCreate(bool autoDelete, int32_t order);
...
@@ -107,7 +107,7 @@ STSBuf* tsBufCreate(bool autoDelete, int32_t order);
STSBuf
*
tsBufCreateFromFile
(
const
char
*
path
,
bool
autoDelete
);
STSBuf
*
tsBufCreateFromFile
(
const
char
*
path
,
bool
autoDelete
);
STSBuf
*
tsBufCreateFromCompBlocks
(
const
char
*
pData
,
int32_t
numOfBlocks
,
int32_t
len
,
int32_t
tsOrder
);
STSBuf
*
tsBufCreateFromCompBlocks
(
const
char
*
pData
,
int32_t
numOfBlocks
,
int32_t
len
,
int32_t
tsOrder
);
void
*
tsBufDest
or
y
(
STSBuf
*
pTSBuf
);
void
*
tsBufDest
ro
y
(
STSBuf
*
pTSBuf
);
void
tsBufAppend
(
STSBuf
*
pTSBuf
,
int32_t
vnodeId
,
int64_t
tag
,
const
char
*
pData
,
int32_t
len
);
void
tsBufAppend
(
STSBuf
*
pTSBuf
,
int32_t
vnodeId
,
int64_t
tag
,
const
char
*
pData
,
int32_t
len
);
int32_t
tsBufMerge
(
STSBuf
*
pDestBuf
,
const
STSBuf
*
pSrcBuf
,
int32_t
vnodeIdx
);
int32_t
tsBufMerge
(
STSBuf
*
pDestBuf
,
const
STSBuf
*
pSrcBuf
,
int32_t
vnodeIdx
);
...
...
src/util/src/ttime.c
浏览文件 @
398c3e79
...
@@ -317,29 +317,34 @@ int32_t parseLocaltimeWithDst(char* timestr, int64_t* time, int32_t timePrec) {
...
@@ -317,29 +317,34 @@ int32_t parseLocaltimeWithDst(char* timestr, int64_t* time, int32_t timePrec) {
static
int32_t
getTimestampInUsFromStrImpl
(
int64_t
val
,
char
unit
,
int64_t
*
result
)
{
static
int32_t
getTimestampInUsFromStrImpl
(
int64_t
val
,
char
unit
,
int64_t
*
result
)
{
*
result
=
val
;
*
result
=
val
;
int64_t
factor
=
1000L
;
switch
(
unit
)
{
switch
(
unit
)
{
case
's'
:
case
's'
:
(
*
result
)
*=
MILLISECOND_PER_SECOND
;
(
*
result
)
*=
MILLISECOND_PER_SECOND
*
factor
;
break
;
break
;
case
'm'
:
case
'm'
:
(
*
result
)
*=
MILLISECOND_PER_MINUTE
;
(
*
result
)
*=
MILLISECOND_PER_MINUTE
*
factor
;
break
;
break
;
case
'h'
:
case
'h'
:
(
*
result
)
*=
MILLISECOND_PER_HOUR
;
(
*
result
)
*=
MILLISECOND_PER_HOUR
*
factor
;
break
;
break
;
case
'd'
:
case
'd'
:
(
*
result
)
*=
MILLISECOND_PER_DAY
;
(
*
result
)
*=
MILLISECOND_PER_DAY
*
factor
;
break
;
break
;
case
'w'
:
case
'w'
:
(
*
result
)
*=
MILLISECOND_PER_WEEK
;
(
*
result
)
*=
MILLISECOND_PER_WEEK
*
factor
;
break
;
break
;
case
'n'
:
case
'n'
:
(
*
result
)
*=
MILLISECOND_PER_MONTH
;
(
*
result
)
*=
MILLISECOND_PER_MONTH
*
factor
;
break
;
break
;
case
'y'
:
case
'y'
:
(
*
result
)
*=
MILLISECOND_PER_YEAR
;
(
*
result
)
*=
MILLISECOND_PER_YEAR
*
factor
;
break
;
break
;
case
'a'
:
case
'a'
:
(
*
result
)
*=
factor
;
break
;
case
'u'
:
break
;
break
;
default:
{
default:
{
;
;
...
@@ -348,7 +353,6 @@ static int32_t getTimestampInUsFromStrImpl(int64_t val, char unit, int64_t* resu
...
@@ -348,7 +353,6 @@ static int32_t getTimestampInUsFromStrImpl(int64_t val, char unit, int64_t* resu
}
}
/* get the value in microsecond */
/* get the value in microsecond */
(
*
result
)
*=
1000L
;
return
0
;
return
0
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录