Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
daab0724
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看板
提交
daab0724
编写于
11月 12, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cell/floor/round reimplemented with scalar expr
上级
9aa19d59
变更
7
展开全部
显示空白变更内容
内联
并排
Showing
7 changed file
with
587 addition
and
438 deletion
+587
-438
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+19
-26
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+0
-3
src/common/inc/texpr.h
src/common/inc/texpr.h
+1
-0
src/common/src/texpr.c
src/common/src/texpr.c
+7
-7
src/query/inc/qAggMain.h
src/query/inc/qAggMain.h
+4
-8
src/query/src/qAggMain.c
src/query/src/qAggMain.c
+3
-264
tests/pytest/functions/function_ceil.py
tests/pytest/functions/function_ceil.py
+553
-130
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
daab0724
...
...
@@ -1837,19 +1837,30 @@ static int32_t handleAggTypeExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t
char
aliasName
[
TSDB_COL_NAME_LEN
]
=
{
0
};
getColumnName
(
pItem
,
aliasName
,
rawName
,
TSDB_COL_NAME_LEN
);
tExprNode
*
pExpr
=
NULL
;
uint64_t
uid
=
0
;
int32_t
ret
=
exprTreeFromSqlExpr
(
pCmd
,
&
pExpr
,
pItem
->
pNode
,
pQueryInfo
,
NULL
,
&
uid
);
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
tExprTreeDestroy
(
pExpr
,
NULL
);
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
"invalid expression in select clause"
);
}
ret
=
exprTreeValidateTree
(
pExpr
);
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
tExprTreeDestroy
(
pExpr
,
NULL
);
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg2
);
}
// the expr associated with the result field will become exprList1 in SQueryInfo, then pExpr2 in SQueryAttr
insertResultField
(
pQueryInfo
,
exprIndex
,
columnList
,
sizeof
(
double
),
TSDB_DATA_TYPE_DOUBLE
,
aliasName
,
NULL
);
insertResultField
(
pQueryInfo
,
exprIndex
,
columnList
,
pExpr
->
resultBytes
,
(
int8_t
)
pExpr
->
resultType
,
aliasName
,
NULL
);
int32_t
slot
=
tscNumOfFields
(
pQueryInfo
)
-
1
;
SInternalField
*
pInfo
=
tscFieldInfoGetInternalField
(
&
pQueryInfo
->
fieldsInfo
,
slot
);
assert
(
pInfo
->
pExpr
==
NULL
);
SExprInfo
*
pExprInfo
=
calloc
(
1
,
sizeof
(
SExprInfo
));
// arithmetic expression always return result in the format of double float
pExprInfo
->
base
.
resBytes
=
sizeof
(
double
)
;
pExprInfo
->
base
.
resBytes
=
pExpr
->
resultBytes
;
pExprInfo
->
base
.
interBytes
=
0
;
pExprInfo
->
base
.
resType
=
TSDB_DATA_TYPE_DOUBLE
;
pExprInfo
->
base
.
resType
=
pExpr
->
resultType
;
pExprInfo
->
base
.
functionId
=
TSDB_FUNC_SCALAR_EXPR
;
pExprInfo
->
base
.
numOfParams
=
1
;
...
...
@@ -1857,19 +1868,9 @@ static int32_t handleAggTypeExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t
strncpy
(
pExprInfo
->
base
.
aliasName
,
aliasName
,
tListLen
(
pExprInfo
->
base
.
aliasName
));
strncpy
(
pExprInfo
->
base
.
token
,
rawName
,
tListLen
(
pExprInfo
->
base
.
token
));
int32_t
ret
=
exprTreeFromSqlExpr
(
pCmd
,
&
pExprInfo
->
pExpr
,
pItem
->
pNode
,
pQueryInfo
,
NULL
,
&
(
pExprInfo
->
base
.
uid
));
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
tExprTreeDestroy
(
pExprInfo
->
pExpr
,
NULL
);
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
"invalid expression in select clause"
);
}
pExprInfo
->
pExpr
=
pExpr
;
pExprInfo
->
base
.
uid
=
uid
;
pInfo
->
pExpr
=
pExprInfo
;
ret
=
exprTreeValidateTree
(
pExprInfo
->
pExpr
);
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
tExprTreeDestroy
(
pExprInfo
->
pExpr
,
NULL
);
pExprInfo
->
pExpr
=
NULL
;
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg2
);
}
SBufferWriter
bw
=
tbufInitWriter
(
NULL
,
false
);
...
...
@@ -2608,9 +2609,6 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
case
TSDB_FUNC_DIFF
:
case
TSDB_FUNC_DERIVATIVE
:
case
TSDB_FUNC_CSUM
:
case
TSDB_FUNC_CEIL
:
case
TSDB_FUNC_FLOOR
:
case
TSDB_FUNC_ROUND
:
case
TSDB_FUNC_STDDEV
:
case
TSDB_FUNC_LEASTSQR
:
{
// 1. valid the number of parameters
...
...
@@ -3685,10 +3683,6 @@ static bool functionCompatibleCheck(SQueryInfo* pQueryInfo, bool joinQuery, bool
++
prjNum
;
}
if
(
functionId
==
TSDB_FUNC_CEIL
||
functionId
==
TSDB_FUNC_FLOOR
||
functionId
==
TSDB_FUNC_ROUND
)
{
++
scalarFuncNum
;
}
if
(
TSDB_FUNC_IS_SCALAR
(
functionId
))
{
++
scalarFuncNum
;
}
...
...
@@ -6662,8 +6656,7 @@ int32_t validateFunctionsInIntervalOrGroupbyQuery(SSqlCmd* pCmd, SQueryInfo* pQu
int32_t
f
=
pExpr
->
base
.
functionId
;
if
((
f
==
TSDB_FUNC_PRJ
&&
pExpr
->
base
.
numOfParams
==
0
)
||
f
==
TSDB_FUNC_DIFF
||
f
==
TSDB_FUNC_SCALAR_EXPR
||
f
==
TSDB_FUNC_DERIVATIVE
||
f
==
TSDB_FUNC_CSUM
||
f
==
TSDB_FUNC_MAVG
||
f
==
TSDB_FUNC_CEIL
||
f
==
TSDB_FUNC_FLOOR
||
f
==
TSDB_FUNC_ROUND
)
f
==
TSDB_FUNC_CSUM
||
f
==
TSDB_FUNC_MAVG
)
{
isProjectionFunction
=
true
;
break
;
...
...
src/client/src/tscUtil.c
浏览文件 @
daab0724
...
...
@@ -274,9 +274,6 @@ bool tscIsProjectionQueryOnSTable(SQueryInfo* pQueryInfo, int32_t tableIndex) {
functionId
!=
TSDB_FUNC_CSUM
&&
functionId
!=
TSDB_FUNC_TS_DUMMY
&&
functionId
!=
TSDB_FUNC_TID_TAG
&&
functionId
!=
TSDB_FUNC_CEIL
&&
functionId
!=
TSDB_FUNC_FLOOR
&&
functionId
!=
TSDB_FUNC_ROUND
&&
!
TSDB_FUNC_IS_SCALAR
(
functionId
))
{
return
false
;
}
...
...
src/common/inc/texpr.h
浏览文件 @
daab0724
...
...
@@ -63,6 +63,7 @@ struct SSchema;
#define TSDB_FUNC_SCALAR_CONCAT (TSDB_FUNC_FLAG_SCALAR | 0x000D)
#define TSDB_FUNC_SCALAR_LENGTH (TSDB_FUNC_FLAG_SCALAR | 0x000E)
#define TSDB_FUNC_SCALAR_MAX_NUM 15
#define TSDB_FUNC_SCALAR_NAME_MAX_LEN 16
typedef
struct
{
...
...
src/common/src/texpr.c
浏览文件 @
daab0724
...
...
@@ -1258,7 +1258,7 @@ void vectorMathFunc(int16_t functionId, tExprOperandInfo *pInputs, uint8_t numIn
SET_TYPED_DATA
(
outputData
,
pOutput
->
type
,
result
);
}
else
if
(
pInputs
[
0
].
type
==
TSDB_DATA_TYPE_DOUBLE
)
{
double
v
=
0
;
GET_TYPED_DATA
(
v
,
float
,
pInputs
[
0
].
type
,
inputData
[
0
]);
GET_TYPED_DATA
(
v
,
double
,
pInputs
[
0
].
type
,
inputData
[
0
]);
double
result
=
ceil
(
v
);
SET_TYPED_DATA
(
outputData
,
pOutput
->
type
,
result
);
}
...
...
@@ -1278,7 +1278,7 @@ void vectorMathFunc(int16_t functionId, tExprOperandInfo *pInputs, uint8_t numIn
SET_TYPED_DATA
(
outputData
,
pOutput
->
type
,
result
);
}
else
if
(
pInputs
[
0
].
type
==
TSDB_DATA_TYPE_DOUBLE
)
{
double
v
=
0
;
GET_TYPED_DATA
(
v
,
float
,
pInputs
[
0
].
type
,
inputData
[
0
]);
GET_TYPED_DATA
(
v
,
double
,
pInputs
[
0
].
type
,
inputData
[
0
]);
double
result
=
floor
(
v
);
SET_TYPED_DATA
(
outputData
,
pOutput
->
type
,
result
);
}
...
...
@@ -1299,7 +1299,7 @@ void vectorMathFunc(int16_t functionId, tExprOperandInfo *pInputs, uint8_t numIn
SET_TYPED_DATA
(
outputData
,
pOutput
->
type
,
result
);
}
else
if
(
pInputs
[
0
].
type
==
TSDB_DATA_TYPE_DOUBLE
)
{
double
v
=
0
;
GET_TYPED_DATA
(
v
,
float
,
pInputs
[
0
].
type
,
inputData
[
0
]);
GET_TYPED_DATA
(
v
,
double
,
pInputs
[
0
].
type
,
inputData
[
0
]);
double
result
=
round
(
v
);
SET_TYPED_DATA
(
outputData
,
pOutput
->
type
,
result
);
}
...
...
@@ -1310,9 +1310,9 @@ void vectorMathFunc(int16_t functionId, tExprOperandInfo *pInputs, uint8_t numIn
assert
(
false
);
break
;
}
}
}
}
}
// end switch function(id)
}
// end can produce value, all child has value
}
// end for each row
free
(
inputData
);
}
...
...
@@ -1381,7 +1381,7 @@ tScalarFunctionInfo aScalarFunctions[] = {
},
{
TSDB_FUNC_SCALAR_FLOOR
,
"floo
o
r"
,
"floor"
,
vectorMathFunc
,
},
{
...
...
src/query/inc/qAggMain.h
浏览文件 @
daab0724
...
...
@@ -70,15 +70,11 @@ extern "C" {
#define TSDB_FUNC_TID_TAG 31
#define TSDB_FUNC_DERIVATIVE 32
#define TSDB_FUNC_C
EIL
33
#define TSDB_FUNC_
FLOOR
34
#define TSDB_FUNC_
ROUND
35
#define TSDB_FUNC_C
SUM
33
#define TSDB_FUNC_
MAVG
34
#define TSDB_FUNC_
SAMPLE
35
#define TSDB_FUNC_CSUM 36
#define TSDB_FUNC_MAVG 37
#define TSDB_FUNC_SAMPLE 38
#define TSDB_FUNC_BLKINFO 39
#define TSDB_FUNC_BLKINFO 36
///////////////////////////////////////////
// the following functions is not implemented.
...
...
src/query/src/qAggMain.c
浏览文件 @
daab0724
...
...
@@ -206,8 +206,7 @@ int32_t getResultDataInfo(int32_t dataType, int32_t dataBytes, int32_t functionI
if
(
functionId
==
TSDB_FUNC_TS
||
functionId
==
TSDB_FUNC_TS_DUMMY
||
functionId
==
TSDB_FUNC_TAG_DUMMY
||
functionId
==
TSDB_FUNC_DIFF
||
functionId
==
TSDB_FUNC_PRJ
||
functionId
==
TSDB_FUNC_TAGPRJ
||
functionId
==
TSDB_FUNC_TAG
||
functionId
==
TSDB_FUNC_INTERP
||
functionId
==
TSDB_FUNC_CEIL
||
functionId
==
TSDB_FUNC_FLOOR
||
functionId
==
TSDB_FUNC_ROUND
)
functionId
==
TSDB_FUNC_TAG
||
functionId
==
TSDB_FUNC_INTERP
)
{
*
type
=
(
int16_t
)
dataType
;
*
bytes
=
(
int16_t
)
dataBytes
;
...
...
@@ -4502,233 +4501,6 @@ void blockinfo_func_finalizer(SQLFunctionCtx* pCtx) {
doFinalizer
(
pCtx
);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define CFR_SET_VAL(type, data, pCtx, func, i, step, notNullElems) \
do { \
type *pData = (type *) data; \
type *pOutput = (type *) pCtx->pOutput; \
\
for (; i < pCtx->size && i >= 0; i += step) { \
if (pCtx->hasNull && isNull((const char*) &pData[i], pCtx->inputType)) { \
continue; \
} \
\
*pOutput++ = (type) func((double) pData[i]); \
\
notNullElems++; \
} \
} while (0)
#define CFR_SET_VAL_DOUBLE(data, pCtx, func, i, step, notNullElems) \
do { \
double *pData = (double *) data; \
double *pOutput = (double *) pCtx->pOutput; \
\
for (; i < pCtx->size && i >= 0; i += step) { \
if (pCtx->hasNull && isNull((const char*) &pData[i], pCtx->inputType)) { \
continue; \
} \
\
SET_DOUBLE_VAL(pOutput, func(pData[i])); \
pOutput++; \
\
notNullElems++; \
} \
} while (0)
static
void
ceil_function
(
SQLFunctionCtx
*
pCtx
)
{
void
*
data
=
GET_INPUT_DATA_LIST
(
pCtx
);
int32_t
notNullElems
=
0
;
int32_t
step
=
GET_FORWARD_DIRECTION_FACTOR
(
pCtx
->
order
);
int32_t
i
=
(
pCtx
->
order
==
TSDB_ORDER_ASC
)
?
0
:
pCtx
->
size
-
1
;
switch
(
pCtx
->
inputType
)
{
case
TSDB_DATA_TYPE_INT
:
{
CFR_SET_VAL
(
int32_t
,
data
,
pCtx
,
ceil
,
i
,
step
,
notNullElems
);
break
;
};
case
TSDB_DATA_TYPE_UINT
:
{
CFR_SET_VAL
(
uint32_t
,
data
,
pCtx
,
ceil
,
i
,
step
,
notNullElems
);
break
;
};
case
TSDB_DATA_TYPE_BIGINT
:
{
CFR_SET_VAL
(
int64_t
,
data
,
pCtx
,
ceil
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_UBIGINT
:
{
CFR_SET_VAL
(
uint64_t
,
data
,
pCtx
,
ceil
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_DOUBLE
:
{
CFR_SET_VAL_DOUBLE
(
data
,
pCtx
,
ceil
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_FLOAT
:
{
CFR_SET_VAL
(
float
,
data
,
pCtx
,
ceil
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_SMALLINT
:
{
CFR_SET_VAL
(
int16_t
,
data
,
pCtx
,
ceil
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_USMALLINT
:
{
CFR_SET_VAL
(
uint16_t
,
data
,
pCtx
,
ceil
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_TINYINT
:
{
CFR_SET_VAL
(
int8_t
,
data
,
pCtx
,
ceil
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_UTINYINT
:
{
CFR_SET_VAL
(
uint8_t
,
data
,
pCtx
,
ceil
,
i
,
step
,
notNullElems
);
break
;
}
default:
qError
(
"error input type"
);
}
if
(
notNullElems
<=
0
)
{
/*
* current block may be null value
*/
assert
(
pCtx
->
hasNull
);
}
else
{
GET_RES_INFO
(
pCtx
)
->
numOfRes
+=
notNullElems
;
}
}
static
void
floor_function
(
SQLFunctionCtx
*
pCtx
)
{
void
*
data
=
GET_INPUT_DATA_LIST
(
pCtx
);
int32_t
notNullElems
=
0
;
int32_t
step
=
GET_FORWARD_DIRECTION_FACTOR
(
pCtx
->
order
);
int32_t
i
=
(
pCtx
->
order
==
TSDB_ORDER_ASC
)
?
0
:
pCtx
->
size
-
1
;
switch
(
pCtx
->
inputType
)
{
case
TSDB_DATA_TYPE_INT
:
{
CFR_SET_VAL
(
int32_t
,
data
,
pCtx
,
floor
,
i
,
step
,
notNullElems
);
break
;
};
case
TSDB_DATA_TYPE_UINT
:
{
CFR_SET_VAL
(
uint32_t
,
data
,
pCtx
,
floor
,
i
,
step
,
notNullElems
);
break
;
};
case
TSDB_DATA_TYPE_BIGINT
:
{
CFR_SET_VAL
(
int64_t
,
data
,
pCtx
,
floor
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_UBIGINT
:
{
CFR_SET_VAL
(
uint64_t
,
data
,
pCtx
,
floor
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_DOUBLE
:
{
CFR_SET_VAL_DOUBLE
(
data
,
pCtx
,
floor
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_FLOAT
:
{
CFR_SET_VAL
(
float
,
data
,
pCtx
,
floor
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_SMALLINT
:
{
CFR_SET_VAL
(
int16_t
,
data
,
pCtx
,
floor
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_USMALLINT
:
{
CFR_SET_VAL
(
uint16_t
,
data
,
pCtx
,
floor
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_TINYINT
:
{
CFR_SET_VAL
(
int8_t
,
data
,
pCtx
,
floor
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_UTINYINT
:
{
CFR_SET_VAL
(
uint8_t
,
data
,
pCtx
,
floor
,
i
,
step
,
notNullElems
);
break
;
}
default:
qError
(
"error input type"
);
}
if
(
notNullElems
<=
0
)
{
/*
* current block may be null value
*/
assert
(
pCtx
->
hasNull
);
}
else
{
GET_RES_INFO
(
pCtx
)
->
numOfRes
+=
notNullElems
;
}
}
static
void
round_function
(
SQLFunctionCtx
*
pCtx
)
{
void
*
data
=
GET_INPUT_DATA_LIST
(
pCtx
);
int32_t
notNullElems
=
0
;
int32_t
step
=
GET_FORWARD_DIRECTION_FACTOR
(
pCtx
->
order
);
int32_t
i
=
(
pCtx
->
order
==
TSDB_ORDER_ASC
)
?
0
:
pCtx
->
size
-
1
;
switch
(
pCtx
->
inputType
)
{
case
TSDB_DATA_TYPE_INT
:
{
CFR_SET_VAL
(
int32_t
,
data
,
pCtx
,
round
,
i
,
step
,
notNullElems
);
break
;
};
case
TSDB_DATA_TYPE_UINT
:
{
CFR_SET_VAL
(
uint32_t
,
data
,
pCtx
,
round
,
i
,
step
,
notNullElems
);
break
;
};
case
TSDB_DATA_TYPE_BIGINT
:
{
CFR_SET_VAL
(
int64_t
,
data
,
pCtx
,
round
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_UBIGINT
:
{
CFR_SET_VAL
(
uint64_t
,
data
,
pCtx
,
round
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_DOUBLE
:
{
CFR_SET_VAL_DOUBLE
(
data
,
pCtx
,
round
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_FLOAT
:
{
CFR_SET_VAL
(
float
,
data
,
pCtx
,
round
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_SMALLINT
:
{
CFR_SET_VAL
(
int16_t
,
data
,
pCtx
,
round
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_USMALLINT
:
{
CFR_SET_VAL
(
uint16_t
,
data
,
pCtx
,
round
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_TINYINT
:
{
CFR_SET_VAL
(
int8_t
,
data
,
pCtx
,
round
,
i
,
step
,
notNullElems
);
break
;
}
case
TSDB_DATA_TYPE_UTINYINT
:
{
CFR_SET_VAL
(
uint8_t
,
data
,
pCtx
,
round
,
i
,
step
,
notNullElems
);
break
;
}
default:
qError
(
"error input type"
);
}
if
(
notNullElems
<=
0
)
{
/*
* current block may be null value
*/
assert
(
pCtx
->
hasNull
);
}
else
{
GET_RES_INFO
(
pCtx
)
->
numOfRes
+=
notNullElems
;
}
}
#undef CFR_SET_VAL
#undef CFR_SET_VAL_DOUBLE
//////////////////////////////////////////////////////////////////////////////////
//cumulative_sum function
...
...
@@ -5074,8 +4846,8 @@ int32_t functionCompatList[] = {
4
,
-
1
,
-
1
,
1
,
1
,
1
,
1
,
1
,
1
,
-
1
,
// tag, colprj, tagprj, arithm, diff, first_dist, last_dist, stddev_dst, interp rate, irate
1
,
1
,
1
,
1
,
-
1
,
1
,
1
,
1
,
5
,
1
,
1
,
// tid_tag, deriv, c
eil, floor, round, c
sum, mavg, sample,
6
,
8
,
1
,
1
,
1
,
-
1
,
-
1
,
-
1
,
// tid_tag, deriv, csum, mavg, sample,
6
,
8
,
-
1
,
-
1
,
-
1
,
// block_info
7
};
...
...
@@ -5479,39 +5251,6 @@ SAggFunctionInfo aAggs[] = {{
noop1
,
dataBlockRequired
,
},
{
// 33
"ceil"
,
TSDB_FUNC_CEIL
,
TSDB_FUNC_CEIL
,
TSDB_FUNCSTATE_MO
|
TSDB_FUNCSTATE_STABLE
|
TSDB_FUNCSTATE_NEED_TS
|
TSDB_FUNCSTATE_SCALAR
,
function_setup
,
ceil_function
,
doFinalizer
,
noop1
,
dataBlockRequired
},
{
// 34
"floor"
,
TSDB_FUNC_FLOOR
,
TSDB_FUNC_FLOOR
,
TSDB_FUNCSTATE_MO
|
TSDB_FUNCSTATE_STABLE
|
TSDB_FUNCSTATE_NEED_TS
|
TSDB_FUNCSTATE_SCALAR
,
function_setup
,
floor_function
,
doFinalizer
,
noop1
,
dataBlockRequired
},
{
// 35
"round"
,
TSDB_FUNC_ROUND
,
TSDB_FUNC_ROUND
,
TSDB_FUNCSTATE_MO
|
TSDB_FUNCSTATE_STABLE
|
TSDB_FUNCSTATE_NEED_TS
|
TSDB_FUNCSTATE_SCALAR
,
function_setup
,
round_function
,
doFinalizer
,
noop1
,
dataBlockRequired
},
{
// 36
"csum"
,
...
...
tests/pytest/functions/function_ceil.py
浏览文件 @
daab0724
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录