提交 9b76c49d 编写于 作者: H Haojun Liao

[td-225] refactor

上级 9b224d9b
......@@ -235,15 +235,19 @@ typedef struct SQuery {
void* tsdb;
SMemRef memRef;
STableGroupInfo tableGroupInfo; // table <tid, last_key> list SArray<STableKeyInfo>
int32_t vgId;
} SQuery;
typedef SSDataBlock* (*__operator_fn_t)(void* param);
typedef struct SOperatorInfo {
char *name;
bool blockingOptr;
void *optInfo;
char *name;
bool blockingOptr;
bool completed;
void *optInfo;
SExprInfo *pExpr;
int32_t numOfOutput;
__operator_fn_t exec;
struct SOperatorInfo *upstream;
} SOperatorInfo;
......@@ -284,6 +288,7 @@ typedef struct SQueryRuntimeEnv {
int32_t groupIndex;
int32_t tableIndex;
STableGroupInfo tableqinfoGroupInfo; // this is a group array list, including SArray<STableQueryInfo*> structure
SOperatorInfo* proot;
} SQueryRuntimeEnv;
typedef struct {
......@@ -301,8 +306,6 @@ typedef struct SQInfo {
int32_t code; // error code to returned to client
int64_t owner; // if it is in execution
int32_t vgId;
SQueryRuntimeEnv runtimeEnv;
SQuery query;
......@@ -365,13 +368,27 @@ typedef struct SAggOperatorInfo {
SResultRowInfo *pResultRowInfo;
STableQueryInfo *pTableQueryInfo;
SQueryRuntimeEnv *pRuntimeEnv;
SQLFunctionCtx *pCtx;
} SAggOperatorInfo;
typedef struct SArithOperatorInfo {
STableQueryInfo *pTableQueryInfo;
SQueryRuntimeEnv *pRuntimeEnv;
SQLFunctionCtx* pCtx;
} SArithOperatorInfo;
typedef struct SLimitOperatorInfo {
int64_t limit;
int64_t total;
SQueryRuntimeEnv* pRuntimeEnv;
} SLimitOperatorInfo;
typedef struct SOffsetOperatorInfo {
int64_t offset;
int64_t currentOffset;
SQueryRuntimeEnv* pRuntimeEnv;
} SOffsetOperatorInfo;
void freeParam(SQueryParam *param);
int32_t convertQueryMsg(SQueryTableMsg *pQueryMsg, SQueryParam* param);
int32_t createQueryFuncExprFromMsg(SQueryTableMsg *pQueryMsg, int32_t numOfOutput, SExprInfo **pExprInfo, SSqlFuncMsg **pExprMsg,
......
......@@ -3564,7 +3564,7 @@ char *getArithColumnData(void *param, const char* name, int32_t colId) {
}
}
assert(index >= 0 && colId >= 0);
assert(index >= 0 /*&& colId >= 0*/);
return pSupport->data[index] + pSupport->offset * pSupport->colList[index].bytes;
}
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册