enh:[TD-32459] Abstract function properties into a struct.
This commit is contained in:
parent
c26ab17f19
commit
5f7dbde47f
|
@ -31,10 +31,10 @@ typedef EFuncDataRequired (*FFuncDynDataRequired)(void* pRes, SDataBlockInfo* pB
|
||||||
typedef EFuncReturnRows (*FEstimateReturnRows)(SFunctionNode* pFunc);
|
typedef EFuncReturnRows (*FEstimateReturnRows)(SFunctionNode* pFunc);
|
||||||
|
|
||||||
#define MAX_FUNC_PARA_NUM 16
|
#define MAX_FUNC_PARA_NUM 16
|
||||||
|
#define MAX_FUNC_PARA_FIXED_VALUE_NUM 16
|
||||||
typedef struct SParamRange {
|
typedef struct SParamRange {
|
||||||
double dMinVal;
|
int64_t iMinVal;
|
||||||
double dMaxVal;
|
int64_t iMaxVal;
|
||||||
} SParamRange;
|
} SParamRange;
|
||||||
|
|
||||||
typedef struct SParamInfo {
|
typedef struct SParamInfo {
|
||||||
|
@ -43,17 +43,11 @@ typedef struct SParamInfo {
|
||||||
int8_t endParam;
|
int8_t endParam;
|
||||||
uint64_t validDataType;
|
uint64_t validDataType;
|
||||||
uint64_t validNodeType;
|
uint64_t validNodeType;
|
||||||
bool hasRange;
|
uint64_t paramAttribute;
|
||||||
bool isTs; // used for input parameter
|
uint8_t valueRangeFlag; // 0 for no range and no fixed value, 1 for value has range, 2 for fixed value
|
||||||
bool isPK; // used for input parameter
|
|
||||||
bool isFixedValue; // used for input parameter
|
|
||||||
bool hasColumn; // used for input parameter, parameter must contain columns
|
|
||||||
bool isFirstLast; // special check for first and last
|
|
||||||
bool isTimeUnit; // used for input parameter, need check whether time unit is valid
|
|
||||||
bool isHistogramBin; // used for input parameter, need check whether histogram bin is valid
|
|
||||||
uint8_t fixedValueSize;
|
uint8_t fixedValueSize;
|
||||||
char fixedStrValue[MAX_FUNC_PARA_NUM][16]; // used for input parameter
|
char* fixedStrValue[MAX_FUNC_PARA_FIXED_VALUE_NUM]; // used for input parameter
|
||||||
int32_t fixedNumValue[MAX_FUNC_PARA_NUM]; // used for input parameter
|
int64_t fixedNumValue[MAX_FUNC_PARA_FIXED_VALUE_NUM]; // used for input parameter
|
||||||
SParamRange range;
|
SParamRange range;
|
||||||
} SParamInfo;
|
} SParamInfo;
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,16 @@ extern "C" {
|
||||||
#define FUNC_PARAM_SUPPORT_COLUMN_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(6)
|
#define FUNC_PARAM_SUPPORT_COLUMN_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(6)
|
||||||
#define FUNC_PARAM_SUPPORT_NOT_VALUE_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(7)
|
#define FUNC_PARAM_SUPPORT_NOT_VALUE_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(7)
|
||||||
|
|
||||||
#define FUNC_PARAM_SUPPORT_NODE_MAX 7
|
#define FUNC_PARAM_NO_SPECIFIC_ATTRIBUTE 0
|
||||||
|
#define FUNC_PARAM_MUST_BE_PRIMTS 1
|
||||||
|
#define FUNC_PARAM_MUST_BE_PK 2
|
||||||
|
#define FUNC_PARAM_MUST_HAVE_COLUMN 3
|
||||||
|
#define FUNC_PARAM_MUST_BE_TIME_UNIT 4
|
||||||
|
#define FUNC_PARAM_VALUE_NODE_NOT_NULL 5
|
||||||
|
|
||||||
|
#define FUNC_PARAM_NO_SPECIFIC_VALUE 0
|
||||||
|
#define FUNC_PARAM_HAS_RANGE 1
|
||||||
|
#define FUNC_PARAM_HAS_FIXED_VALUE 2
|
||||||
|
|
||||||
#define FUNC_ERR_RET(c) \
|
#define FUNC_ERR_RET(c) \
|
||||||
do { \
|
do { \
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue