[td-11818] refactor
This commit is contained in:
parent
f2d61c567c
commit
1444f0b466
|
@ -20,16 +20,16 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef void* qinfo_t;
|
typedef void* qTaskInfo_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* create the qinfo object according to QueryTableMsg
|
* create the qinfo object according to QueryTableMsg
|
||||||
* @param tsdb
|
* @param tsdb
|
||||||
* @param pQueryTableMsg
|
* @param pQueryTableMsg
|
||||||
* @param qinfo
|
* @param pTaskInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int32_t qCreateQueryInfo(void* tsdb, int32_t vgId, SQueryTableInfo* pQueryTableMsg, qinfo_t* qinfo, uint64_t qId);
|
int32_t qCreateTask(void* tsdb, int32_t vgId, void* pQueryTableMsg, qTaskInfo_t* pTaskInfo, uint64_t qId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the main query execution function, including query on both table and multiple tables,
|
* the main query execution function, including query on both table and multiple tables,
|
||||||
|
@ -38,7 +38,7 @@ int32_t qCreateQueryInfo(void* tsdb, int32_t vgId, SQueryTableInfo* pQueryTableM
|
||||||
* @param qinfo
|
* @param qinfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
bool qTableQuery(qinfo_t qinfo, uint64_t *qId);
|
bool qExecTask(qTaskInfo_t qinfo, uint64_t *qId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the produced results information, if current query is not paused or completed,
|
* Retrieve the produced results information, if current query is not paused or completed,
|
||||||
|
@ -48,7 +48,7 @@ bool qTableQuery(qinfo_t qinfo, uint64_t *qId);
|
||||||
* @param qinfo
|
* @param qinfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int32_t qRetrieveQueryResultInfo(qinfo_t qinfo, bool* buildRes, void* pRspContext);
|
int32_t qRetrieveQueryResultInfo(qTaskInfo_t qinfo, bool* buildRes, void* pRspContext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -60,41 +60,41 @@ int32_t qRetrieveQueryResultInfo(qinfo_t qinfo, bool* buildRes, void* pRspContex
|
||||||
* @param contLen payload length
|
* @param contLen payload length
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int32_t qDumpRetrieveResult(qinfo_t qinfo, SRetrieveTableRsp** pRsp, int32_t* contLen, bool* continueExec);
|
int32_t qDumpRetrieveResult(qTaskInfo_t qinfo, SRetrieveTableRsp** pRsp, int32_t* contLen, bool* continueExec);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return the transporter context (RPC)
|
* return the transporter context (RPC)
|
||||||
* @param qinfo
|
* @param qinfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void* qGetResultRetrieveMsg(qinfo_t qinfo);
|
void* qGetResultRetrieveMsg(qTaskInfo_t qinfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* kill the ongoing query and free the query handle and corresponding resources automatically
|
* kill the ongoing query and free the query handle and corresponding resources automatically
|
||||||
* @param qinfo qhandle
|
* @param qinfo qhandle
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int32_t qKillQuery(qinfo_t qinfo);
|
int32_t qKillTask(qTaskInfo_t qinfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return whether query is completed or not
|
* return whether query is completed or not
|
||||||
* @param qinfo
|
* @param qinfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int32_t qIsQueryCompleted(qinfo_t qinfo);
|
int32_t qIsQueryCompleted(qTaskInfo_t qinfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* destroy query info structure
|
* destroy query info structure
|
||||||
* @param qHandle
|
* @param qHandle
|
||||||
*/
|
*/
|
||||||
void qDestroyQueryInfo(qinfo_t qHandle);
|
void qDestroyTask(qTaskInfo_t qHandle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the queried table uid
|
* Get the queried table uid
|
||||||
* @param qHandle
|
* @param qHandle
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int64_t qGetQueriedTableUid(qinfo_t qHandle);
|
int64_t qGetQueriedTableUid(qTaskInfo_t qHandle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract the qualified table id list, and than pass them to the TSDB driver to load the required table data blocks.
|
* Extract the qualified table id list, and than pass them to the TSDB driver to load the required table data blocks.
|
||||||
|
@ -121,7 +121,7 @@ int32_t qCreateTableGroupByGroupExpr(SArray* pTableIdList, TSKEY skey, STableGro
|
||||||
* @param type operation type: ADD|DROP
|
* @param type operation type: ADD|DROP
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int32_t qUpdateQueriedTableIdList(qinfo_t qinfo, int64_t uid, int32_t type);
|
int32_t qUpdateQueriedTableIdList(qTaskInfo_t qinfo, int64_t uid, int32_t type);
|
||||||
|
|
||||||
//================================================================================================
|
//================================================================================================
|
||||||
// query handle management
|
// query handle management
|
||||||
|
@ -130,13 +130,13 @@ int32_t qUpdateQueriedTableIdList(qinfo_t qinfo, int64_t uid, int32_t type);
|
||||||
* @param vgId
|
* @param vgId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void* qOpenQueryMgmt(int32_t vgId);
|
void* qOpenTaskMgmt(int32_t vgId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* broadcast the close information and wait for all query stop.
|
* broadcast the close information and wait for all query stop.
|
||||||
* @param pExecutor
|
* @param pExecutor
|
||||||
*/
|
*/
|
||||||
void qQueryMgmtNotifyClosed(void* pExecutor);
|
void qTaskMgmtNotifyClosing(void* pExecutor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Re-open the query handle management module when opening the vnode again.
|
* Re-open the query handle management module when opening the vnode again.
|
||||||
|
@ -148,7 +148,7 @@ void qQueryMgmtReOpen(void *pExecutor);
|
||||||
* Close query mgmt and clean up resources.
|
* Close query mgmt and clean up resources.
|
||||||
* @param pExecutor
|
* @param pExecutor
|
||||||
*/
|
*/
|
||||||
void qCleanupQueryMgmt(void* pExecutor);
|
void qCleanupTaskMgmt(void* pExecutor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the query into the query mgmt object
|
* Add the query into the query mgmt object
|
||||||
|
@ -157,7 +157,7 @@ void qCleanupQueryMgmt(void* pExecutor);
|
||||||
* @param qInfo
|
* @param qInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void** qRegisterQInfo(void* pMgmt, uint64_t qId, void *qInfo);
|
void** qRegisterTask(void* pMgmt, uint64_t qId, void *qInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* acquire the query handle according to the key from query mgmt object.
|
* acquire the query handle according to the key from query mgmt object.
|
||||||
|
@ -165,7 +165,7 @@ void** qRegisterQInfo(void* pMgmt, uint64_t qId, void *qInfo);
|
||||||
* @param key
|
* @param key
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void** qAcquireQInfo(void* pMgmt, uint64_t key);
|
void** qAcquireTask(void* pMgmt, uint64_t key);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* release the query handle and decrease the reference count in cache
|
* release the query handle and decrease the reference count in cache
|
||||||
|
@ -174,7 +174,7 @@ void** qAcquireQInfo(void* pMgmt, uint64_t key);
|
||||||
* @param freeHandle
|
* @param freeHandle
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void** qReleaseQInfo(void* pMgmt, void* pQInfo);
|
void** qReleaseTask(void* pMgmt, void* pQInfo, bool freeHandle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* De-register the query handle from the management module and free it immediately.
|
* De-register the query handle from the management module and free it immediately.
|
||||||
|
|
|
@ -183,7 +183,6 @@ typedef struct tExprNode {
|
||||||
|
|
||||||
struct {// function node
|
struct {// function node
|
||||||
char functionName[FUNCTIONS_NAME_MAX_LENGTH];
|
char functionName[FUNCTIONS_NAME_MAX_LENGTH];
|
||||||
// int32_t functionId;
|
|
||||||
int32_t num;
|
int32_t num;
|
||||||
|
|
||||||
// Note that the attribute of pChild is not the parameter of function, it is the columns that involved in the
|
// Note that the attribute of pChild is not the parameter of function, it is the columns that involved in the
|
||||||
|
|
|
@ -8,5 +8,5 @@ target_include_directories(
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
executor
|
executor
|
||||||
PRIVATE os util common function parser
|
PRIVATE os util common function parser qcom
|
||||||
)
|
)
|
|
@ -88,37 +88,37 @@ typedef struct SResultRowPool {
|
||||||
SArray* pData; // SArray<void*>
|
SArray* pData; // SArray<void*>
|
||||||
} SResultRowPool;
|
} SResultRowPool;
|
||||||
|
|
||||||
struct SQueryAttr;
|
struct STaskAttr;
|
||||||
struct SQueryRuntimeEnv;
|
struct STaskRuntimeEnv;
|
||||||
struct SUdfInfo;
|
struct SUdfInfo;
|
||||||
|
|
||||||
int32_t getOutputInterResultBufSize(struct SQueryAttr* pQueryAttr);
|
int32_t getOutputInterResultBufSize(struct STaskAttr* pQueryAttr);
|
||||||
|
|
||||||
size_t getResultRowSize(struct SQueryRuntimeEnv* pRuntimeEnv);
|
size_t getResultRowSize(struct STaskRuntimeEnv* pRuntimeEnv);
|
||||||
int32_t initResultRowInfo(SResultRowInfo* pResultRowInfo, int32_t size, int16_t type);
|
int32_t initResultRowInfo(SResultRowInfo* pResultRowInfo, int32_t size, int16_t type);
|
||||||
void cleanupResultRowInfo(SResultRowInfo* pResultRowInfo);
|
void cleanupResultRowInfo(SResultRowInfo* pResultRowInfo);
|
||||||
|
|
||||||
void resetResultRowInfo(struct SQueryRuntimeEnv* pRuntimeEnv, SResultRowInfo* pResultRowInfo);
|
void resetResultRowInfo(struct STaskRuntimeEnv* pRuntimeEnv, SResultRowInfo* pResultRowInfo);
|
||||||
int32_t numOfClosedResultRows(SResultRowInfo* pResultRowInfo);
|
int32_t numOfClosedResultRows(SResultRowInfo* pResultRowInfo);
|
||||||
void closeAllResultRows(SResultRowInfo* pResultRowInfo);
|
void closeAllResultRows(SResultRowInfo* pResultRowInfo);
|
||||||
|
|
||||||
int32_t initResultRow(SResultRow *pResultRow);
|
int32_t initResultRow(SResultRow *pResultRow);
|
||||||
void closeResultRow(SResultRowInfo* pResultRowInfo, int32_t slot);
|
void closeResultRow(SResultRowInfo* pResultRowInfo, int32_t slot);
|
||||||
bool isResultRowClosed(SResultRowInfo *pResultRowInfo, int32_t slot);
|
bool isResultRowClosed(SResultRowInfo *pResultRowInfo, int32_t slot);
|
||||||
void clearResultRow(struct SQueryRuntimeEnv* pRuntimeEnv, SResultRow* pResultRow, int16_t type);
|
void clearResultRow(struct STaskRuntimeEnv* pRuntimeEnv, SResultRow* pResultRow, int16_t type);
|
||||||
|
|
||||||
struct SResultRowEntryInfo* getResultCell(const SResultRow* pRow, int32_t index, int32_t* offset);
|
struct SResultRowEntryInfo* getResultCell(const SResultRow* pRow, int32_t index, int32_t* offset);
|
||||||
|
|
||||||
void* destroyQueryFuncExpr(SExprInfo* pExprInfo, int32_t numOfExpr);
|
void* destroyQueryFuncExpr(SExprInfo* pExprInfo, int32_t numOfExpr);
|
||||||
void* freeColumnInfo(SColumnInfo* pColumnInfo, int32_t numOfCols);
|
void* freeColumnInfo(SColumnInfo* pColumnInfo, int32_t numOfCols);
|
||||||
int32_t getRowNumForMultioutput(struct SQueryAttr* pQueryAttr, bool topBottomQuery, bool stable);
|
int32_t getRowNumForMultioutput(struct STaskAttr* pQueryAttr, bool topBottomQuery, bool stable);
|
||||||
|
|
||||||
static FORCE_INLINE SResultRow *getResultRow(SResultRowInfo *pResultRowInfo, int32_t slot) {
|
static FORCE_INLINE SResultRow *getResultRow(SResultRowInfo *pResultRowInfo, int32_t slot) {
|
||||||
assert(pResultRowInfo != NULL && slot >= 0 && slot < pResultRowInfo->size);
|
assert(pResultRowInfo != NULL && slot >= 0 && slot < pResultRowInfo->size);
|
||||||
return pResultRowInfo->pResult[slot];
|
return pResultRowInfo->pResult[slot];
|
||||||
}
|
}
|
||||||
|
|
||||||
static FORCE_INLINE char* getPosInResultPage(struct SQueryAttr* pQueryAttr, SFilePage* page, int32_t rowOffset,
|
static FORCE_INLINE char* getPosInResultPage(struct STaskAttr* pQueryAttr, SFilePage* page, int32_t rowOffset,
|
||||||
int32_t offset) {
|
int32_t offset) {
|
||||||
assert(rowOffset >= 0 && pQueryAttr != NULL);
|
assert(rowOffset >= 0 && pQueryAttr != NULL);
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ bool hasRemainData(SGroupResInfo* pGroupResInfo);
|
||||||
bool incNextGroup(SGroupResInfo* pGroupResInfo);
|
bool incNextGroup(SGroupResInfo* pGroupResInfo);
|
||||||
int32_t getNumOfTotalRes(SGroupResInfo* pGroupResInfo);
|
int32_t getNumOfTotalRes(SGroupResInfo* pGroupResInfo);
|
||||||
|
|
||||||
int32_t mergeIntoGroupResult(SGroupResInfo* pGroupResInfo, struct SQueryRuntimeEnv *pRuntimeEnv, int32_t* offset);
|
int32_t mergeIntoGroupResult(SGroupResInfo* pGroupResInfo, struct STaskRuntimeEnv *pRuntimeEnv, int32_t* offset);
|
||||||
|
|
||||||
int32_t initUdfInfo(struct SUdfInfo* pUdfInfo);
|
int32_t initUdfInfo(struct SUdfInfo* pUdfInfo);
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "tvariant.h"
|
#include "tvariant.h"
|
||||||
|
|
||||||
#include "thash.h"
|
#include "thash.h"
|
||||||
//#include "parser.h"
|
|
||||||
#include "executil.h"
|
#include "executil.h"
|
||||||
#include "taosdef.h"
|
#include "taosdef.h"
|
||||||
#include "tarray.h"
|
#include "tarray.h"
|
||||||
|
@ -166,7 +165,7 @@ typedef struct {
|
||||||
|
|
||||||
// The basic query information extracted from the SQueryInfo tree to support the
|
// The basic query information extracted from the SQueryInfo tree to support the
|
||||||
// execution of query in a data node.
|
// execution of query in a data node.
|
||||||
typedef struct SQueryAttr {
|
typedef struct STaskAttr {
|
||||||
SLimit limit;
|
SLimit limit;
|
||||||
SLimit slimit;
|
SLimit slimit;
|
||||||
|
|
||||||
|
@ -229,16 +228,16 @@ typedef struct SQueryAttr {
|
||||||
STableGroupInfo tableGroupInfo; // table <tid, last_key> list SArray<STableKeyInfo>
|
STableGroupInfo tableGroupInfo; // table <tid, last_key> list SArray<STableKeyInfo>
|
||||||
int32_t vgId;
|
int32_t vgId;
|
||||||
SArray *pUdfInfo; // no need to free
|
SArray *pUdfInfo; // no need to free
|
||||||
} SQueryAttr;
|
} STaskAttr;
|
||||||
|
|
||||||
typedef SSDataBlock* (*__operator_fn_t)(void* param, bool* newgroup);
|
typedef SSDataBlock* (*__operator_fn_t)(void* param, bool* newgroup);
|
||||||
typedef void (*__optr_cleanup_fn_t)(void* param, int32_t num);
|
typedef void (*__optr_cleanup_fn_t)(void* param, int32_t num);
|
||||||
|
|
||||||
struct SOperatorInfo;
|
struct SOperatorInfo;
|
||||||
|
|
||||||
typedef struct SQueryRuntimeEnv {
|
typedef struct STaskRuntimeEnv {
|
||||||
jmp_buf env;
|
jmp_buf env;
|
||||||
SQueryAttr* pQueryAttr;
|
STaskAttr* pQueryAttr;
|
||||||
uint32_t status; // query status
|
uint32_t status; // query status
|
||||||
void* qinfo;
|
void* qinfo;
|
||||||
uint8_t scanFlag; // denotes reversed scan of data or not
|
uint8_t scanFlag; // denotes reversed scan of data or not
|
||||||
|
@ -271,7 +270,7 @@ typedef struct SQueryRuntimeEnv {
|
||||||
SRspResultInfo resultInfo;
|
SRspResultInfo resultInfo;
|
||||||
SHashObj *pTableRetrieveTsMap;
|
SHashObj *pTableRetrieveTsMap;
|
||||||
struct SUdfInfo *pUdfInfo;
|
struct SUdfInfo *pUdfInfo;
|
||||||
} SQueryRuntimeEnv;
|
} STaskRuntimeEnv;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
OP_IN_EXECUTING = 1,
|
OP_IN_EXECUTING = 1,
|
||||||
|
@ -287,9 +286,9 @@ typedef struct SOperatorInfo {
|
||||||
char *name; // name, used to show the query execution plan
|
char *name; // name, used to show the query execution plan
|
||||||
void *info; // extension attribution
|
void *info; // extension attribution
|
||||||
SExprInfo *pExpr;
|
SExprInfo *pExpr;
|
||||||
SQueryRuntimeEnv *pRuntimeEnv;
|
STaskRuntimeEnv *pRuntimeEnv;
|
||||||
|
|
||||||
struct SOperatorInfo **upstream; // upstream pointer list
|
struct SOperatorInfo ** pDownstream; // upstream pointer list
|
||||||
int32_t numOfUpstream; // number of upstream. The value is always ONE expect for join operator
|
int32_t numOfUpstream; // number of upstream. The value is always ONE expect for join operator
|
||||||
__operator_fn_t exec;
|
__operator_fn_t exec;
|
||||||
__optr_cleanup_fn_t cleanup;
|
__optr_cleanup_fn_t cleanup;
|
||||||
|
@ -312,8 +311,8 @@ typedef struct SQInfo {
|
||||||
int32_t code; // error code to returned to client
|
int32_t code; // error code to returned to client
|
||||||
int64_t owner; // if it is in execution
|
int64_t owner; // if it is in execution
|
||||||
|
|
||||||
SQueryRuntimeEnv runtimeEnv;
|
STaskRuntimeEnv runtimeEnv;
|
||||||
SQueryAttr query;
|
STaskAttr query;
|
||||||
void* pBuf; // allocated buffer for STableQueryInfo, sizeof(STableQueryInfo)*numOfTables;
|
void* pBuf; // allocated buffer for STableQueryInfo, sizeof(STableQueryInfo)*numOfTables;
|
||||||
|
|
||||||
pthread_mutex_t lock; // used to synchronize the rsp/query threads
|
pthread_mutex_t lock; // used to synchronize the rsp/query threads
|
||||||
|
@ -325,7 +324,7 @@ typedef struct SQInfo {
|
||||||
SQueryCostInfo summary;
|
SQueryCostInfo summary;
|
||||||
} SQInfo;
|
} SQInfo;
|
||||||
|
|
||||||
typedef struct SQueryParam {
|
typedef struct STaskParam {
|
||||||
char *sql;
|
char *sql;
|
||||||
char *tagCond;
|
char *tagCond;
|
||||||
char *colCond;
|
char *colCond;
|
||||||
|
@ -345,7 +344,7 @@ typedef struct SQueryParam {
|
||||||
int32_t tableScanOperator;
|
int32_t tableScanOperator;
|
||||||
SArray *pOperator;
|
SArray *pOperator;
|
||||||
struct SUdfInfo *pUdfInfo;
|
struct SUdfInfo *pUdfInfo;
|
||||||
} SQueryParam;
|
} STaskParam;
|
||||||
|
|
||||||
typedef struct STableScanInfo {
|
typedef struct STableScanInfo {
|
||||||
void *pQueryHandle;
|
void *pQueryHandle;
|
||||||
|
@ -512,34 +511,34 @@ typedef struct SOrderOperatorInfo {
|
||||||
|
|
||||||
void appendUpstream(SOperatorInfo* p, SOperatorInfo* pUpstream);
|
void appendUpstream(SOperatorInfo* p, SOperatorInfo* pUpstream);
|
||||||
|
|
||||||
SOperatorInfo* createDataBlocksOptScanInfo(void* pTsdbQueryHandle, SQueryRuntimeEnv* pRuntimeEnv, int32_t repeatTime, int32_t reverseTime);
|
SOperatorInfo* createDataBlocksOptScanInfo(void* pTsdbQueryHandle, STaskRuntimeEnv* pRuntimeEnv, int32_t repeatTime, int32_t reverseTime);
|
||||||
SOperatorInfo* createTableScanOperator(void* pTsdbQueryHandle, SQueryRuntimeEnv* pRuntimeEnv, int32_t repeatTime);
|
SOperatorInfo* createTableScanOperator(void* pTsdbQueryHandle, STaskRuntimeEnv* pRuntimeEnv, int32_t repeatTime);
|
||||||
SOperatorInfo* createTableSeqScanOperator(void* pTsdbQueryHandle, SQueryRuntimeEnv* pRuntimeEnv);
|
SOperatorInfo* createTableSeqScanOperator(void* pTsdbQueryHandle, STaskRuntimeEnv* pRuntimeEnv);
|
||||||
|
|
||||||
SOperatorInfo* createAggregateOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
SOperatorInfo* createAggregateOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
||||||
SOperatorInfo* createProjectOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
SOperatorInfo* createProjectOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
||||||
SOperatorInfo* createLimitOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream);
|
SOperatorInfo* createLimitOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream);
|
||||||
SOperatorInfo* createTimeIntervalOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
SOperatorInfo* createTimeIntervalOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
||||||
SOperatorInfo* createAllTimeIntervalOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
SOperatorInfo* createAllTimeIntervalOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
||||||
SOperatorInfo* createSWindowOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
SOperatorInfo* createSWindowOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
||||||
SOperatorInfo* createFillOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput, bool multigroupResult);
|
SOperatorInfo* createFillOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput, bool multigroupResult);
|
||||||
SOperatorInfo* createGroupbyOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
SOperatorInfo* createGroupbyOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
||||||
SOperatorInfo* createMultiTableAggOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
SOperatorInfo* createMultiTableAggOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
||||||
SOperatorInfo* createMultiTableTimeIntervalOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
SOperatorInfo* createMultiTableTimeIntervalOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
||||||
SOperatorInfo* createAllMultiTableTimeIntervalOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
SOperatorInfo* createAllMultiTableTimeIntervalOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
||||||
SOperatorInfo* createTagScanOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SExprInfo* pExpr, int32_t numOfOutput);
|
SOperatorInfo* createTagScanOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SExprInfo* pExpr, int32_t numOfOutput);
|
||||||
SOperatorInfo* createDistinctOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
SOperatorInfo* createDistinctOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
||||||
SOperatorInfo* createTableBlockInfoScanOperator(void* pTsdbQueryHandle, SQueryRuntimeEnv* pRuntimeEnv);
|
SOperatorInfo* createTableBlockInfoScanOperator(void* pTsdbQueryHandle, STaskRuntimeEnv* pRuntimeEnv);
|
||||||
SOperatorInfo* createMultiwaySortOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SExprInfo* pExpr, int32_t numOfOutput,
|
SOperatorInfo* createMultiwaySortOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SExprInfo* pExpr, int32_t numOfOutput,
|
||||||
int32_t numOfRows, void* merger);
|
int32_t numOfRows, void* merger);
|
||||||
SOperatorInfo* createGlobalAggregateOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput, void* param, SArray* pUdfInfo, bool groupResultMixedUp);
|
SOperatorInfo* createGlobalAggregateOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput, void* param, SArray* pUdfInfo, bool groupResultMixedUp);
|
||||||
SOperatorInfo* createStatewindowOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
SOperatorInfo* createStatewindowOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput);
|
||||||
SOperatorInfo* createSLimitOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput, void* merger, bool multigroupResult);
|
SOperatorInfo* createSLimitOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput, void* merger, bool multigroupResult);
|
||||||
SOperatorInfo* createFilterOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr,
|
SOperatorInfo* createFilterOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr,
|
||||||
int32_t numOfOutput, SColumnInfo* pCols, int32_t numOfFilter);
|
int32_t numOfOutput, SColumnInfo* pCols, int32_t numOfFilter);
|
||||||
|
|
||||||
SOperatorInfo* createJoinOperatorInfo(SOperatorInfo** pUpstream, int32_t numOfUpstream, SSchema* pSchema, int32_t numOfOutput);
|
SOperatorInfo* createJoinOperatorInfo(SOperatorInfo** pUpstream, int32_t numOfUpstream, SSchema* pSchema, int32_t numOfOutput);
|
||||||
SOperatorInfo* createOrderOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput, SOrder* pOrderVal);
|
SOperatorInfo* createOrderOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* upstream, SExprInfo* pExpr, int32_t numOfOutput, SOrder* pOrderVal);
|
||||||
|
|
||||||
SSDataBlock* doGlobalAggregate(void* param, bool* newgroup);
|
SSDataBlock* doGlobalAggregate(void* param, bool* newgroup);
|
||||||
SSDataBlock* doMultiwayMergeSort(void* param, bool* newgroup);
|
SSDataBlock* doMultiwayMergeSort(void* param, bool* newgroup);
|
||||||
|
@ -561,8 +560,8 @@ void updateOutputBuf(SOptrBasicInfo* pBInfo, int32_t *bufCapacity, int32_t numOf
|
||||||
void clearOutputBuf(SOptrBasicInfo* pBInfo, int32_t *bufCapacity);
|
void clearOutputBuf(SOptrBasicInfo* pBInfo, int32_t *bufCapacity);
|
||||||
void copyTsColoum(SSDataBlock* pRes, SQLFunctionCtx* pCtx, int32_t numOfOutput);
|
void copyTsColoum(SSDataBlock* pRes, SQLFunctionCtx* pCtx, int32_t numOfOutput);
|
||||||
|
|
||||||
void freeParam(SQueryParam *param);
|
void freeParam(STaskParam *param);
|
||||||
int32_t convertQueryMsg(SQueryTableMsg *pQueryMsg, SQueryParam* param);
|
int32_t convertQueryMsg(SQueryTableMsg *pQueryMsg, STaskParam* param);
|
||||||
int32_t createQueryFunc(SQueriedTableInfo* pTableInfo, int32_t numOfOutput, SExprInfo** pExprInfo,
|
int32_t createQueryFunc(SQueriedTableInfo* pTableInfo, int32_t numOfOutput, SExprInfo** pExprInfo,
|
||||||
SSqlExpr** pExprMsg, SColumnInfo* pTagCols, int32_t queryType, void* pMsg, struct SUdfInfo* pUdfInfo);
|
SSqlExpr** pExprMsg, SColumnInfo* pTagCols, int32_t queryType, void* pMsg, struct SUdfInfo* pUdfInfo);
|
||||||
|
|
||||||
|
@ -575,13 +574,13 @@ SGroupbyExpr *createGroupbyExprFromMsg(SQueryTableMsg *pQueryMsg, SColIndex *pCo
|
||||||
SQInfo *createQInfoImpl(SQueryTableMsg *pQueryMsg, SGroupbyExpr *pGroupbyExpr, SExprInfo *pExprs,
|
SQInfo *createQInfoImpl(SQueryTableMsg *pQueryMsg, SGroupbyExpr *pGroupbyExpr, SExprInfo *pExprs,
|
||||||
SExprInfo *pSecExprs, STableGroupInfo *pTableGroupInfo, SColumnInfo* pTagCols, SFilterInfo* pFilters, int32_t vgId, char* sql, uint64_t qId, struct SUdfInfo* pUdfInfo);
|
SExprInfo *pSecExprs, STableGroupInfo *pTableGroupInfo, SColumnInfo* pTagCols, SFilterInfo* pFilters, int32_t vgId, char* sql, uint64_t qId, struct SUdfInfo* pUdfInfo);
|
||||||
|
|
||||||
int32_t initQInfo(STsBufInfo* pTsBufInfo, void* tsdb, void* sourceOptr, SQInfo* pQInfo, SQueryParam* param, char* start,
|
int32_t initQInfo(STsBufInfo* pTsBufInfo, void* tsdb, void* sourceOptr, SQInfo* pQInfo, STaskParam* param, char* start,
|
||||||
int32_t prevResultLen, void* merger);
|
int32_t prevResultLen, void* merger);
|
||||||
|
|
||||||
int32_t createFilterInfo(SQueryAttr* pQueryAttr, uint64_t qId);
|
int32_t createFilterInfo(STaskAttr* pQueryAttr, uint64_t qId);
|
||||||
void freeColumnFilterInfo(SColumnFilterInfo* pFilter, int32_t numOfFilters);
|
void freeColumnFilterInfo(SColumnFilterInfo* pFilter, int32_t numOfFilters);
|
||||||
|
|
||||||
STableQueryInfo *createTableQueryInfo(SQueryAttr* pQueryAttr, void* pTable, bool groupbyColumn, STimeWindow win, void* buf);
|
STableQueryInfo *createTableQueryInfo(STaskAttr* pQueryAttr, void* pTable, bool groupbyColumn, STimeWindow win, void* buf);
|
||||||
STableQueryInfo* createTmpTableQueryInfo(STimeWindow win);
|
STableQueryInfo* createTmpTableQueryInfo(STimeWindow win);
|
||||||
|
|
||||||
int32_t buildArithmeticExprFromMsg(SExprInfo *pArithExprInfo, void *pQueryMsg);
|
int32_t buildArithmeticExprFromMsg(SExprInfo *pArithExprInfo, void *pQueryMsg);
|
||||||
|
@ -590,9 +589,9 @@ bool isQueryKilled(SQInfo *pQInfo);
|
||||||
int32_t checkForQueryBuf(size_t numOfTables);
|
int32_t checkForQueryBuf(size_t numOfTables);
|
||||||
bool checkNeedToCompressQueryCol(SQInfo *pQInfo);
|
bool checkNeedToCompressQueryCol(SQInfo *pQInfo);
|
||||||
bool doBuildResCheck(SQInfo* pQInfo);
|
bool doBuildResCheck(SQInfo* pQInfo);
|
||||||
void setQueryStatus(SQueryRuntimeEnv *pRuntimeEnv, int8_t status);
|
void setQueryStatus(STaskRuntimeEnv *pRuntimeEnv, int8_t status);
|
||||||
|
|
||||||
bool onlyQueryTags(SQueryAttr* pQueryAttr);
|
bool onlyQueryTags(STaskAttr* pQueryAttr);
|
||||||
void destroyUdfInfo(struct SUdfInfo* pUdfInfo);
|
void destroyUdfInfo(struct SUdfInfo* pUdfInfo);
|
||||||
|
|
||||||
bool isValidQInfo(void *param);
|
bool isValidQInfo(void *param);
|
||||||
|
@ -607,8 +606,8 @@ void publishQueryAbortEvent(SQInfo* pQInfo, int32_t code);
|
||||||
void calculateOperatorProfResults(SQInfo* pQInfo);
|
void calculateOperatorProfResults(SQInfo* pQInfo);
|
||||||
void queryCostStatis(SQInfo *pQInfo);
|
void queryCostStatis(SQInfo *pQInfo);
|
||||||
|
|
||||||
void freeQInfo(SQInfo *pQInfo);
|
void doDestroyTask(SQInfo *pQInfo);
|
||||||
void freeQueryAttr(SQueryAttr *pQuery);
|
void freeQueryAttr(STaskAttr *pQuery);
|
||||||
|
|
||||||
int32_t getMaximumIdleDurationSec();
|
int32_t getMaximumIdleDurationSec();
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ typedef struct SCompSupporter {
|
||||||
int32_t order;
|
int32_t order;
|
||||||
} SCompSupporter;
|
} SCompSupporter;
|
||||||
|
|
||||||
int32_t getRowNumForMultioutput(SQueryAttr* pQueryAttr, bool topBottomQuery, bool stable) {
|
int32_t getRowNumForMultioutput(STaskAttr* pQueryAttr, bool topBottomQuery, bool stable) {
|
||||||
if (pQueryAttr && (!stable)) {
|
if (pQueryAttr && (!stable)) {
|
||||||
for (int16_t i = 0; i < pQueryAttr->numOfOutput; ++i) {
|
for (int16_t i = 0; i < pQueryAttr->numOfOutput; ++i) {
|
||||||
// if (pQueryAttr->pExpr1[i].base. == FUNCTION_TOP || pQueryAttr->pExpr1[i].base.functionId == FUNCTION_BOTTOM) {
|
// if (pQueryAttr->pExpr1[i].base. == FUNCTION_TOP || pQueryAttr->pExpr1[i].base.functionId == FUNCTION_BOTTOM) {
|
||||||
|
@ -42,7 +42,7 @@ int32_t getRowNumForMultioutput(SQueryAttr* pQueryAttr, bool topBottomQuery, boo
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t getOutputInterResultBufSize(SQueryAttr* pQueryAttr) {
|
int32_t getOutputInterResultBufSize(STaskAttr* pQueryAttr) {
|
||||||
int32_t size = 0;
|
int32_t size = 0;
|
||||||
|
|
||||||
for (int32_t i = 0; i < pQueryAttr->numOfOutput; ++i) {
|
for (int32_t i = 0; i < pQueryAttr->numOfOutput; ++i) {
|
||||||
|
@ -86,7 +86,7 @@ void cleanupResultRowInfo(SResultRowInfo *pResultRowInfo) {
|
||||||
tfree(pResultRowInfo->pResult);
|
tfree(pResultRowInfo->pResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
void resetResultRowInfo(SQueryRuntimeEnv *pRuntimeEnv, SResultRowInfo *pResultRowInfo) {
|
void resetResultRowInfo(STaskRuntimeEnv *pRuntimeEnv, SResultRowInfo *pResultRowInfo) {
|
||||||
if (pResultRowInfo == NULL || pResultRowInfo->capacity == 0) {
|
if (pResultRowInfo == NULL || pResultRowInfo->capacity == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ void closeResultRow(SResultRowInfo *pResultRowInfo, int32_t slot) {
|
||||||
getResultRow(pResultRowInfo, slot)->closed = true;
|
getResultRow(pResultRowInfo, slot)->closed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearResultRow(SQueryRuntimeEnv *pRuntimeEnv, SResultRow *pResultRow, int16_t type) {
|
void clearResultRow(STaskRuntimeEnv *pRuntimeEnv, SResultRow *pResultRow, int16_t type) {
|
||||||
if (pResultRow == NULL) {
|
if (pResultRow == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -174,8 +174,8 @@ struct SResultRowEntryInfo* getResultCell(const SResultRow* pRow, int32_t index,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t getResultRowSize(SQueryRuntimeEnv* pRuntimeEnv) {
|
size_t getResultRowSize(STaskRuntimeEnv* pRuntimeEnv) {
|
||||||
SQueryAttr* pQueryAttr = pRuntimeEnv->pQueryAttr;
|
STaskAttr* pQueryAttr = pRuntimeEnv->pQueryAttr;
|
||||||
return 0;
|
return 0;
|
||||||
// return (pQueryAttr->numOfOutput * sizeof(SResultRowEntryInfo)) + pQueryAttr->interBufSize + sizeof(SResultRow);
|
// return (pQueryAttr->numOfOutput * sizeof(SResultRowEntryInfo)) + pQueryAttr->interBufSize + sizeof(SResultRow);
|
||||||
}
|
}
|
||||||
|
@ -393,8 +393,8 @@ int32_t getNumOfTotalRes(SGroupResInfo* pGroupResInfo) {
|
||||||
return (int32_t) taosArrayGetSize(pGroupResInfo->pRows);
|
return (int32_t) taosArrayGetSize(pGroupResInfo->pRows);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int64_t getNumOfResultWindowRes(SQueryRuntimeEnv* pRuntimeEnv, SResultRow *pResultRow, int32_t* rowCellInfoOffset) {
|
static int64_t getNumOfResultWindowRes(STaskRuntimeEnv* pRuntimeEnv, SResultRow *pResultRow, int32_t* rowCellInfoOffset) {
|
||||||
SQueryAttr* pQueryAttr = pRuntimeEnv->pQueryAttr;
|
STaskAttr* pQueryAttr = pRuntimeEnv->pQueryAttr;
|
||||||
|
|
||||||
for (int32_t j = 0; j < pQueryAttr->numOfOutput; ++j) {
|
for (int32_t j = 0; j < pQueryAttr->numOfOutput; ++j) {
|
||||||
int32_t functionId = 0;//pQueryAttr->pExpr1[j].base.functionId;
|
int32_t functionId = 0;//pQueryAttr->pExpr1[j].base.functionId;
|
||||||
|
@ -488,7 +488,7 @@ int32_t tsDescOrder(const void* p1, const void* p2) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void orderTheResultRows(SQueryRuntimeEnv* pRuntimeEnv) {
|
void orderTheResultRows(STaskRuntimeEnv* pRuntimeEnv) {
|
||||||
__compar_fn_t fn = NULL;
|
__compar_fn_t fn = NULL;
|
||||||
if (pRuntimeEnv->pQueryAttr->order.order == TSDB_ORDER_ASC) {
|
if (pRuntimeEnv->pQueryAttr->order.order == TSDB_ORDER_ASC) {
|
||||||
fn = tsAscOrder;
|
fn = tsAscOrder;
|
||||||
|
@ -499,7 +499,7 @@ void orderTheResultRows(SQueryRuntimeEnv* pRuntimeEnv) {
|
||||||
taosArraySort(pRuntimeEnv->pResultRowArrayList, fn);
|
taosArraySort(pRuntimeEnv->pResultRowArrayList, fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t mergeIntoGroupResultImplRv(SQueryRuntimeEnv *pRuntimeEnv, SGroupResInfo* pGroupResInfo, uint64_t groupId, int32_t* rowCellInfoOffset) {
|
static int32_t mergeIntoGroupResultImplRv(STaskRuntimeEnv *pRuntimeEnv, SGroupResInfo* pGroupResInfo, uint64_t groupId, int32_t* rowCellInfoOffset) {
|
||||||
if (!pGroupResInfo->ordered) {
|
if (!pGroupResInfo->ordered) {
|
||||||
orderTheResultRows(pRuntimeEnv);
|
orderTheResultRows(pRuntimeEnv);
|
||||||
pGroupResInfo->ordered = true;
|
pGroupResInfo->ordered = true;
|
||||||
|
@ -528,7 +528,7 @@ static int32_t mergeIntoGroupResultImplRv(SQueryRuntimeEnv *pRuntimeEnv, SGroupR
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static UNUSED_FUNC int32_t mergeIntoGroupResultImpl(SQueryRuntimeEnv *pRuntimeEnv, SGroupResInfo* pGroupResInfo, SArray *pTableList,
|
static UNUSED_FUNC int32_t mergeIntoGroupResultImpl(STaskRuntimeEnv *pRuntimeEnv, SGroupResInfo* pGroupResInfo, SArray *pTableList,
|
||||||
int32_t* rowCellInfoOffset) {
|
int32_t* rowCellInfoOffset) {
|
||||||
bool ascQuery = QUERY_IS_ASC_QUERY(pRuntimeEnv->pQueryAttr);
|
bool ascQuery = QUERY_IS_ASC_QUERY(pRuntimeEnv->pQueryAttr);
|
||||||
|
|
||||||
|
@ -630,7 +630,7 @@ static UNUSED_FUNC int32_t mergeIntoGroupResultImpl(SQueryRuntimeEnv *pRuntimeEn
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t mergeIntoGroupResult(SGroupResInfo* pGroupResInfo, SQueryRuntimeEnv* pRuntimeEnv, int32_t* offset) {
|
int32_t mergeIntoGroupResult(SGroupResInfo* pGroupResInfo, STaskRuntimeEnv* pRuntimeEnv, int32_t* offset) {
|
||||||
int64_t st = taosGetTimestampUs();
|
int64_t st = taosGetTimestampUs();
|
||||||
|
|
||||||
while (pGroupResInfo->currentGroup < pGroupResInfo->totalGroup) {
|
while (pGroupResInfo->currentGroup < pGroupResInfo->totalGroup) {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -126,7 +126,6 @@ typedef struct SSchJob {
|
||||||
#define SCH_LOCK(type, _lock) (SCH_READ == (type) ? taosRLockLatch(_lock) : taosWLockLatch(_lock))
|
#define SCH_LOCK(type, _lock) (SCH_READ == (type) ? taosRLockLatch(_lock) : taosWLockLatch(_lock))
|
||||||
#define SCH_UNLOCK(type, _lock) (SCH_READ == (type) ? taosRUnLockLatch(_lock) : taosWUnLockLatch(_lock))
|
#define SCH_UNLOCK(type, _lock) (SCH_READ == (type) ? taosRUnLockLatch(_lock) : taosWUnLockLatch(_lock))
|
||||||
|
|
||||||
|
|
||||||
extern int32_t schLaunchTask(SSchJob *job, SSchTask *task);
|
extern int32_t schLaunchTask(SSchJob *job, SSchTask *task);
|
||||||
extern int32_t schBuildAndSendMsg(SSchJob *job, SSchTask *task, int32_t msgType);
|
extern int32_t schBuildAndSendMsg(SSchJob *job, SSchTask *task, int32_t msgType);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue