Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d88f1efe
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
d88f1efe
编写于
2月 02, 2023
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: support force fill clause
上级
461dbe75
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
29 addition
and
8 deletion
+29
-8
include/common/tmsg.h
include/common/tmsg.h
+8
-6
include/libs/nodes/querynodes.h
include/libs/nodes/querynodes.h
+2
-0
source/libs/executor/inc/tfill.h
source/libs/executor/inc/tfill.h
+1
-0
source/libs/executor/src/executil.c
source/libs/executor/src/executil.c
+6
-0
source/libs/executor/src/filloperator.c
source/libs/executor/src/filloperator.c
+1
-1
source/libs/executor/src/tfill.c
source/libs/executor/src/tfill.c
+6
-0
source/libs/nodes/src/nodesUtilFuncs.c
source/libs/nodes/src/nodesUtilFuncs.c
+4
-0
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+1
-1
未找到文件。
include/common/tmsg.h
浏览文件 @
d88f1efe
...
...
@@ -144,12 +144,14 @@ typedef enum _mgmt_table {
#define TSDB_ALTER_TABLE_UPDATE_OPTIONS 9
#define TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME 10
#define TSDB_FILL_NONE 0
#define TSDB_FILL_NULL 1
#define TSDB_FILL_SET_VALUE 2
#define TSDB_FILL_LINEAR 3
#define TSDB_FILL_PREV 4
#define TSDB_FILL_NEXT 5
#define TSDB_FILL_NONE 0
#define TSDB_FILL_NULL 1
#define TSDB_FILL_NULL_F 2
#define TSDB_FILL_SET_VALUE 3
#define TSDB_FILL_SET_VALUE_F 4
#define TSDB_FILL_LINEAR 5
#define TSDB_FILL_PREV 6
#define TSDB_FILL_NEXT 7
#define TSDB_ALTER_USER_PASSWD 0x1
#define TSDB_ALTER_USER_SUPERUSER 0x2
...
...
include/libs/nodes/querynodes.h
浏览文件 @
d88f1efe
...
...
@@ -226,8 +226,10 @@ typedef struct SIntervalWindowNode {
typedef
enum
EFillMode
{
FILL_MODE_NONE
=
1
,
FILL_MODE_VALUE
,
FILL_MODE_VALUE_F
,
FILL_MODE_PREV
,
FILL_MODE_NULL
,
FILL_MODE_NULL_F
,
FILL_MODE_LINEAR
,
FILL_MODE_NEXT
}
EFillMode
;
...
...
source/libs/executor/inc/tfill.h
浏览文件 @
d88f1efe
...
...
@@ -62,6 +62,7 @@ typedef struct SFillInfo {
int32_t
srcTsSlotId
;
// timestamp column id in the source data block.
int32_t
order
;
// order [TSDB_ORDER_ASC|TSDB_ORDER_DESC]
int32_t
type
;
// fill type
bool
forceFill
;
// force fill values
int32_t
numOfRows
;
// number of rows in the input data block
int32_t
index
;
// active row index
int32_t
numOfTotal
;
// number of filled rows in one round
...
...
source/libs/executor/src/executil.c
浏览文件 @
d88f1efe
...
...
@@ -1658,12 +1658,18 @@ int32_t convertFillType(int32_t mode) {
case
FILL_MODE_NULL
:
type
=
TSDB_FILL_NULL
;
break
;
case
FILL_MODE_NULL_F
:
type
=
TSDB_FILL_NULL_F
;
break
;
case
FILL_MODE_NEXT
:
type
=
TSDB_FILL_NEXT
;
break
;
case
FILL_MODE_VALUE
:
type
=
TSDB_FILL_SET_VALUE
;
break
;
case
FILL_MODE_VALUE_F
:
type
=
TSDB_FILL_SET_VALUE_F
;
break
;
case
FILL_MODE_LINEAR
:
type
=
TSDB_FILL_LINEAR
;
break
;
...
...
source/libs/executor/src/filloperator.c
浏览文件 @
d88f1efe
...
...
@@ -140,7 +140,7 @@ static SSDataBlock* doFillImpl(SOperatorInfo* pOperator) {
while
(
1
)
{
SSDataBlock
*
pBlock
=
pDownstream
->
fpSet
.
getNextFn
(
pDownstream
);
if
(
pBlock
==
NULL
)
{
if
(
pInfo
->
totalInputRows
==
0
)
{
if
(
pInfo
->
totalInputRows
==
0
&&
!
pInfo
->
pFillInfo
->
forceFill
)
{
setOperatorCompleted
(
pOperator
);
return
NULL
;
}
...
...
source/libs/executor/src/tfill.c
浏览文件 @
d88f1efe
...
...
@@ -457,6 +457,9 @@ struct SFillInfo* taosCreateFillInfo(TSKEY skey, int32_t numOfFillCols, int32_t
case
FILL_MODE_NULL
:
pFillInfo
->
type
=
TSDB_FILL_NULL
;
break
;
case
FILL_MODE_NULL_F
:
pFillInfo
->
type
=
TSDB_FILL_NULL_F
;
break
;
case
FILL_MODE_LINEAR
:
pFillInfo
->
type
=
TSDB_FILL_LINEAR
;
break
;
...
...
@@ -466,6 +469,9 @@ struct SFillInfo* taosCreateFillInfo(TSKEY skey, int32_t numOfFillCols, int32_t
case
FILL_MODE_VALUE
:
pFillInfo
->
type
=
TSDB_FILL_SET_VALUE
;
break
;
case
FILL_MODE_VALUE_F
:
pFillInfo
->
type
=
TSDB_FILL_SET_VALUE_F
;
break
;
default:
{
taosMemoryFree
(
pFillInfo
);
terrno
=
TSDB_CODE_INVALID_PARA
;
...
...
source/libs/nodes/src/nodesUtilFuncs.c
浏览文件 @
d88f1efe
...
...
@@ -1990,10 +1990,14 @@ char* nodesGetFillModeString(EFillMode mode) {
return
"none"
;
case
FILL_MODE_VALUE
:
return
"value"
;
case
FILL_MODE_VALUE_F
:
return
"value_f"
;
case
FILL_MODE_PREV
:
return
"prev"
;
case
FILL_MODE_NULL
:
return
"null"
;
case
FILL_MODE_NULL_F
:
return
"null_f"
;
case
FILL_MODE_LINEAR
:
return
"linear"
;
case
FILL_MODE_NEXT
:
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
d88f1efe
...
...
@@ -2791,7 +2791,7 @@ static int32_t convertFillValue(STranslateContext* pCxt, SDataType dt, SNodeList
}
static
int32_t
checkFillValues
(
STranslateContext
*
pCxt
,
SFillNode
*
pFill
,
SNodeList
*
pProjectionList
)
{
if
(
FILL_MODE_VALUE
!=
pFill
->
mode
)
{
if
(
FILL_MODE_VALUE
!=
pFill
->
mode
&&
FILL_MODE_VALUE_F
!=
pFill
->
mode
)
{
return
TSDB_CODE_SUCCESS
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录