2021-09-24 10:05:56 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software: you can use, redistribute, and/or modify
|
|
|
|
|
* it under the terms of the GNU Affero General Public License, version 3
|
|
|
|
|
* or later ("AGPL"), as published by the Free Software Foundation.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
2023-04-28 03:42:34 +00:00
|
|
|
#ifndef TDENGINE_EXECUTORINT_H
|
|
|
|
|
#define TDENGINE_EXECUTORINT_H
|
2021-09-24 10:05:56 +00:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-04-28 03:42:34 +00:00
|
|
|
#include "os.h"
|
|
|
|
|
#include "tcommon.h"
|
2023-08-18 07:27:02 +00:00
|
|
|
#include "theap.h"
|
2023-04-28 03:42:34 +00:00
|
|
|
#include "tlosertree.h"
|
|
|
|
|
#include "tsort.h"
|
|
|
|
|
#include "tvariant.h"
|
|
|
|
|
|
|
|
|
|
#include "dataSinkMgt.h"
|
|
|
|
|
#include "executil.h"
|
|
|
|
|
#include "executor.h"
|
|
|
|
|
#include "planner.h"
|
|
|
|
|
#include "scalar.h"
|
|
|
|
|
#include "taosdef.h"
|
|
|
|
|
#include "tarray.h"
|
|
|
|
|
#include "tfill.h"
|
|
|
|
|
#include "thash.h"
|
|
|
|
|
#include "tlockfree.h"
|
|
|
|
|
#include "tmsg.h"
|
|
|
|
|
#include "tpagedbuf.h"
|
2023-05-23 10:29:23 +00:00
|
|
|
#include "tlrucache.h"
|
2024-06-24 10:28:56 +00:00
|
|
|
#include "tworker.h"
|
2023-04-28 03:42:34 +00:00
|
|
|
|
|
|
|
|
typedef int32_t (*__block_search_fn_t)(char* data, int32_t num, int64_t key, int32_t order);
|
|
|
|
|
|
2023-05-23 10:29:23 +00:00
|
|
|
typedef struct STsdbReader STsdbReader;
|
2023-08-18 07:27:02 +00:00
|
|
|
typedef struct STqReader STqReader;
|
2023-05-23 10:29:23 +00:00
|
|
|
|
2025-07-23 09:11:16 +00:00
|
|
|
typedef enum EExtWinMode {
|
|
|
|
|
EEXT_MODE_SCALAR = 1,
|
|
|
|
|
EEXT_MODE_AGG,
|
|
|
|
|
EEXT_MODE_INDEFR_FUNC,
|
|
|
|
|
} EExtWinMode;
|
|
|
|
|
|
2023-04-28 03:42:34 +00:00
|
|
|
#define IS_VALID_SESSION_WIN(winInfo) ((winInfo).sessionWin.win.skey > 0)
|
|
|
|
|
#define SET_SESSION_WIN_INVALID(winInfo) ((winInfo).sessionWin.win.skey = INT64_MIN)
|
|
|
|
|
#define IS_INVALID_SESSION_WIN_KEY(winKey) ((winKey).win.skey <= 0)
|
|
|
|
|
#define SET_SESSION_WIN_KEY_INVALID(pWinKey) ((pWinKey)->win.skey = INT64_MIN)
|
|
|
|
|
|
2025-07-23 09:11:16 +00:00
|
|
|
#define IS_STREAM_MODE(_task) ((_task)->execModel == OPTR_EXEC_MODEL_STREAM)
|
2025-07-16 06:42:16 +00:00
|
|
|
|
2023-04-28 03:42:34 +00:00
|
|
|
/**
|
|
|
|
|
* If the number of generated results is greater than this value,
|
|
|
|
|
* query query will be halt and return results to client immediate.
|
|
|
|
|
*/
|
|
|
|
|
typedef struct SResultInfo { // TODO refactor
|
|
|
|
|
int64_t totalRows; // total generated result size in rows
|
|
|
|
|
int64_t totalBytes; // total results in bytes.
|
|
|
|
|
int32_t capacity; // capacity of current result output buffer
|
|
|
|
|
int32_t threshold; // result size threshold in rows.
|
|
|
|
|
} SResultInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct STableQueryInfo {
|
|
|
|
|
TSKEY lastKey; // last check ts, todo remove it later
|
|
|
|
|
SResultRowPosition pos; // current active time window
|
|
|
|
|
} STableQueryInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct SLimit {
|
2026-01-06 05:41:40 +00:00
|
|
|
int64_t limit; // default -1, no limit
|
2023-04-28 03:42:34 +00:00
|
|
|
int64_t offset;
|
|
|
|
|
} SLimit;
|
|
|
|
|
|
|
|
|
|
typedef struct STableScanAnalyzeInfo SFileBlockLoadRecorder;
|
|
|
|
|
|
|
|
|
|
enum {
|
|
|
|
|
STREAM_RECOVER_STEP__NONE = 0,
|
|
|
|
|
STREAM_RECOVER_STEP__PREPARE1,
|
|
|
|
|
STREAM_RECOVER_STEP__PREPARE2,
|
|
|
|
|
STREAM_RECOVER_STEP__SCAN1,
|
|
|
|
|
};
|
|
|
|
|
|
2022-06-15 08:26:43 +00:00
|
|
|
extern int32_t exchangeObjRefPool;
|
|
|
|
|
|
2022-05-02 15:52:32 +00:00
|
|
|
typedef struct {
|
2022-10-13 05:41:36 +00:00
|
|
|
char* pData;
|
|
|
|
|
bool isNull;
|
|
|
|
|
int16_t type;
|
|
|
|
|
int32_t bytes;
|
2022-05-02 15:52:32 +00:00
|
|
|
} SGroupKeys, SStateKeys;
|
2022-01-11 02:51:23 +00:00
|
|
|
|
2023-04-28 03:42:34 +00:00
|
|
|
typedef struct {
|
|
|
|
|
char* tablename;
|
|
|
|
|
char* dbname;
|
|
|
|
|
int32_t tversion;
|
2025-05-10 02:34:54 +00:00
|
|
|
int32_t rversion;
|
2023-04-28 03:42:34 +00:00
|
|
|
SSchemaWrapper* sw;
|
|
|
|
|
SSchemaWrapper* qsw;
|
|
|
|
|
} SSchemaInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct SExchangeOpStopInfo {
|
|
|
|
|
int32_t operatorType;
|
|
|
|
|
int64_t refId;
|
|
|
|
|
} SExchangeOpStopInfo;
|
|
|
|
|
|
2023-07-06 03:13:43 +00:00
|
|
|
typedef struct SGcOperatorParam {
|
2023-08-21 01:12:40 +00:00
|
|
|
int64_t sessionId;
|
|
|
|
|
int32_t downstreamIdx;
|
|
|
|
|
int32_t vgId;
|
|
|
|
|
int64_t tbUid;
|
|
|
|
|
bool needCache;
|
2023-07-06 03:13:43 +00:00
|
|
|
} SGcOperatorParam;
|
|
|
|
|
|
2023-07-28 10:00:33 +00:00
|
|
|
typedef struct SGcNotifyOperatorParam {
|
2023-08-21 01:12:40 +00:00
|
|
|
int32_t downstreamIdx;
|
|
|
|
|
int32_t vgId;
|
|
|
|
|
int64_t tbUid;
|
2023-07-28 10:00:33 +00:00
|
|
|
} SGcNotifyOperatorParam;
|
|
|
|
|
|
2025-09-26 09:32:32 +00:00
|
|
|
struct SExprSupp {
|
2023-04-28 03:42:34 +00:00
|
|
|
SExprInfo* pExprInfo;
|
|
|
|
|
int32_t numOfExprs; // the number of scalar expression in group operator
|
|
|
|
|
SqlFunctionCtx* pCtx;
|
|
|
|
|
int32_t* rowEntryInfoOffset; // offset value for each row result cell info
|
|
|
|
|
SFilterInfo* pFilterInfo;
|
2025-11-26 05:38:41 +00:00
|
|
|
bool hasWindowOrGroup; // denote that the function is used with time window or group
|
|
|
|
|
bool hasWindow; // denote that the function is used with time window
|
2025-09-25 07:48:14 +00:00
|
|
|
bool hasIndefRowsFunc;
|
2025-09-26 09:32:32 +00:00
|
|
|
};
|
2023-04-28 03:42:34 +00:00
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
|
EX_SOURCE_DATA_NOT_READY = 0x1,
|
2023-07-05 03:07:08 +00:00
|
|
|
EX_SOURCE_DATA_STARTED,
|
|
|
|
|
EX_SOURCE_DATA_READY,
|
|
|
|
|
EX_SOURCE_DATA_EXHAUSTED,
|
2023-04-28 03:42:34 +00:00
|
|
|
} EX_SOURCE_STATUS;
|
|
|
|
|
|
|
|
|
|
#define COL_MATCH_FROM_COL_ID 0x1
|
|
|
|
|
#define COL_MATCH_FROM_SLOT_ID 0x2
|
|
|
|
|
|
|
|
|
|
typedef struct SLoadRemoteDataInfo {
|
|
|
|
|
uint64_t totalSize; // total load bytes from remote
|
|
|
|
|
uint64_t totalRows; // total number of rows
|
|
|
|
|
uint64_t totalElapsed; // total elapsed time
|
|
|
|
|
} SLoadRemoteDataInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct SLimitInfo {
|
|
|
|
|
SLimit limit;
|
|
|
|
|
SLimit slimit;
|
|
|
|
|
uint64_t currentGroupId;
|
|
|
|
|
int64_t remainGroupOffset;
|
|
|
|
|
int64_t numOfOutputGroups;
|
|
|
|
|
int64_t remainOffset;
|
|
|
|
|
int64_t numOfOutputRows;
|
|
|
|
|
} SLimitInfo;
|
|
|
|
|
|
2023-07-05 03:07:08 +00:00
|
|
|
typedef struct SSortMergeJoinOperatorParam {
|
2023-08-16 06:28:39 +00:00
|
|
|
bool initDownstream;
|
2023-07-05 03:07:08 +00:00
|
|
|
} SSortMergeJoinOperatorParam;
|
|
|
|
|
|
2025-12-23 08:44:28 +00:00
|
|
|
typedef enum EExchangeSourceType {
|
|
|
|
|
EX_SRC_TYPE_STB_JOIN_SCAN = 1,
|
|
|
|
|
EX_SRC_TYPE_VSTB_SCAN,
|
|
|
|
|
EX_SRC_TYPE_VSTB_WIN_SCAN,
|
|
|
|
|
EX_SRC_TYPE_VSTB_AGG_SCAN,
|
|
|
|
|
EX_SRC_TYPE_VSTB_TAG_SCAN,
|
2026-01-19 06:44:18 +00:00
|
|
|
EX_SRC_TYPE_VTB_WIN_SCAN,
|
2025-12-23 08:44:28 +00:00
|
|
|
} EExchangeSourceType;
|
|
|
|
|
|
2026-01-16 02:32:01 +00:00
|
|
|
typedef enum {
|
|
|
|
|
DYN_TYPE_EXCHANGE_PARAM = 1,
|
|
|
|
|
NOTIFY_TYPE_EXCHANGE_PARAM,
|
|
|
|
|
} EExchangeGetParamType;
|
|
|
|
|
|
2023-07-12 03:29:54 +00:00
|
|
|
typedef struct SExchangeOperatorBasicParam {
|
2026-01-16 02:32:01 +00:00
|
|
|
EExchangeGetParamType paramType;
|
|
|
|
|
/* dynamic scan params */
|
2025-09-10 08:12:11 +00:00
|
|
|
int32_t vgId;
|
|
|
|
|
int32_t srcOpType;
|
|
|
|
|
bool tableSeq;
|
|
|
|
|
SArray* uidList;
|
2025-12-23 08:44:28 +00:00
|
|
|
EExchangeSourceType type;
|
2025-09-10 08:12:11 +00:00
|
|
|
bool isNewDeployed; // used with newDeployedSrc
|
2025-12-01 02:04:07 +00:00
|
|
|
bool isNewParam;
|
2025-12-23 08:44:28 +00:00
|
|
|
uint64_t groupid;
|
|
|
|
|
SOrgTbInfo* orgTbInfo;
|
|
|
|
|
SArray* batchOrgTbInfo; // SArray<SOrgTbInfo>
|
|
|
|
|
SArray* tagList;
|
2025-09-10 08:12:11 +00:00
|
|
|
STimeWindow window;
|
|
|
|
|
SDownstreamSourceNode newDeployedSrc; // used with isNewDeployed
|
2026-01-16 02:32:01 +00:00
|
|
|
/* notify scan params */
|
|
|
|
|
TSKEY notifyTs;
|
2023-07-12 03:29:54 +00:00
|
|
|
} SExchangeOperatorBasicParam;
|
|
|
|
|
|
|
|
|
|
typedef struct SExchangeOperatorBatchParam {
|
2023-08-21 01:12:40 +00:00
|
|
|
bool multiParams;
|
|
|
|
|
SSHashObj* pBatchs; // SExchangeOperatorBasicParam
|
2023-07-12 03:29:54 +00:00
|
|
|
} SExchangeOperatorBatchParam;
|
|
|
|
|
|
|
|
|
|
typedef struct SExchangeOperatorParam {
|
|
|
|
|
bool multiParams;
|
|
|
|
|
SExchangeOperatorBasicParam basic;
|
2023-07-05 03:07:08 +00:00
|
|
|
} SExchangeOperatorParam;
|
|
|
|
|
|
2023-07-28 10:00:33 +00:00
|
|
|
typedef struct SExchangeSrcIndex {
|
|
|
|
|
int32_t srcIdx;
|
|
|
|
|
int32_t inUseIdx;
|
|
|
|
|
} SExchangeSrcIndex;
|
|
|
|
|
|
2023-04-28 03:42:34 +00:00
|
|
|
typedef struct SExchangeInfo {
|
2025-07-23 09:11:16 +00:00
|
|
|
int64_t seqId;
|
2023-07-05 03:07:08 +00:00
|
|
|
SArray* pSources;
|
|
|
|
|
SSHashObj* pHashSources;
|
|
|
|
|
SArray* pSourceDataInfo;
|
|
|
|
|
tsem_t ready;
|
|
|
|
|
void* pTransporter;
|
2023-04-28 03:42:34 +00:00
|
|
|
|
|
|
|
|
// SArray<SSDataBlock*>, result block list, used to keep the multi-block that
|
|
|
|
|
// passed by downstream operator
|
|
|
|
|
SArray* pResultBlockList;
|
|
|
|
|
SArray* pRecycledBlocks; // build a pool for small data block to avoid to repeatly create and then destroy.
|
|
|
|
|
SSDataBlock* pDummyBlock; // dummy block, not keep data
|
|
|
|
|
bool seqLoadData; // sequential load data or not, false by default
|
2023-07-05 03:07:08 +00:00
|
|
|
bool dynamicOp;
|
2025-07-16 06:42:16 +00:00
|
|
|
bool dynTbname; // %%tbname for stream
|
2023-04-28 03:42:34 +00:00
|
|
|
int32_t current;
|
|
|
|
|
SLoadRemoteDataInfo loadInfo;
|
2025-11-14 06:29:30 +00:00
|
|
|
int64_t self;
|
2023-04-28 03:42:34 +00:00
|
|
|
SLimitInfo limitInfo;
|
|
|
|
|
int64_t openedTs; // start exec time stamp, todo: move to SLoadRemoteDataInfo
|
2024-01-18 01:22:39 +00:00
|
|
|
char* pTaskId;
|
2024-08-05 09:39:38 +00:00
|
|
|
SArray* pFetchRpcHandles;
|
2026-01-16 02:32:01 +00:00
|
|
|
bool notifyToSend; // need to send notify STEP DONE message
|
|
|
|
|
TSKEY notifyTs; // notify timestamp
|
2023-04-28 03:42:34 +00:00
|
|
|
} SExchangeInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct SScanInfo {
|
|
|
|
|
int32_t numOfAsc;
|
|
|
|
|
int32_t numOfDesc;
|
|
|
|
|
} SScanInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct SSampleExecInfo {
|
|
|
|
|
double sampleRatio; // data block sample ratio, 1 by default
|
|
|
|
|
uint32_t seed; // random seed value
|
|
|
|
|
} SSampleExecInfo;
|
|
|
|
|
|
|
|
|
|
enum {
|
|
|
|
|
TABLE_SCAN__TABLE_ORDER = 1,
|
|
|
|
|
TABLE_SCAN__BLOCK_ORDER = 2,
|
|
|
|
|
};
|
|
|
|
|
|
2023-12-27 13:37:00 +00:00
|
|
|
typedef enum ETableCountState {
|
2024-07-17 11:35:35 +00:00
|
|
|
TABLE_COUNT_STATE_NONE = 0, // before start scan
|
|
|
|
|
TABLE_COUNT_STATE_SCAN = 1, // cur group scanning
|
|
|
|
|
TABLE_COUNT_STATE_PROCESSED = 2, // cur group processed
|
|
|
|
|
TABLE_COUNT_STATE_END = 3, // finish or noneed to process
|
2023-12-27 13:37:00 +00:00
|
|
|
} ETableCountState;
|
|
|
|
|
|
2025-09-26 09:32:32 +00:00
|
|
|
struct SAggSupporter {
|
2023-04-28 03:42:34 +00:00
|
|
|
SSHashObj* pResultRowHashTable; // quick locate the window object for each result
|
|
|
|
|
char* keyBuf; // window key buffer
|
|
|
|
|
SDiskbasedBuf* pResultBuf; // query result buffer based on blocked-wised disk file
|
|
|
|
|
int32_t resultRowSize; // the result buffer size for each result row, with the meta data size for each row
|
|
|
|
|
int32_t currentPageId; // current write page id
|
2025-09-26 09:32:32 +00:00
|
|
|
};
|
2023-04-28 03:42:34 +00:00
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
// if the upstream is an interval operator, the interval info is also kept here to get the time window to check if
|
|
|
|
|
// current data block needs to be loaded.
|
|
|
|
|
SInterval interval;
|
|
|
|
|
SAggSupporter* pAggSup;
|
|
|
|
|
SExprSupp* pExprSup; // expr supporter of aggregate operator
|
|
|
|
|
} SAggOptrPushDownInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct STableMetaCacheInfo {
|
|
|
|
|
SLRUCache* pTableMetaEntryCache; // 100 by default
|
|
|
|
|
uint64_t metaFetch;
|
|
|
|
|
uint64_t cacheHit;
|
|
|
|
|
} STableMetaCacheInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct STableScanBase {
|
|
|
|
|
STsdbReader* dataReader;
|
|
|
|
|
SFileBlockLoadRecorder readRecorder;
|
|
|
|
|
SQueryTableDataCond cond;
|
2025-03-15 06:10:46 +00:00
|
|
|
SQueryTableDataCond orgCond; // use for virtual super table scan
|
2023-04-28 03:42:34 +00:00
|
|
|
SAggOptrPushDownInfo pdInfo;
|
|
|
|
|
SColMatchInfo matchInfo;
|
|
|
|
|
SReadHandle readHandle;
|
|
|
|
|
SExprSupp pseudoSup;
|
|
|
|
|
STableMetaCacheInfo metaCache;
|
|
|
|
|
int32_t scanFlag; // table scan flag to denote if it is a repeat/reverse/main scan
|
|
|
|
|
int32_t dataBlockLoadFlag;
|
|
|
|
|
SLimitInfo limitInfo;
|
|
|
|
|
// there are more than one table list exists in one task, if only one vnode exists.
|
|
|
|
|
STableListInfo* pTableListInfo;
|
2023-08-18 07:27:02 +00:00
|
|
|
TsdReader readerAPI;
|
2023-04-28 03:42:34 +00:00
|
|
|
} STableScanBase;
|
|
|
|
|
|
|
|
|
|
typedef struct STableScanInfo {
|
|
|
|
|
STableScanBase base;
|
|
|
|
|
SScanInfo scanInfo;
|
|
|
|
|
int32_t scanTimes;
|
|
|
|
|
SSDataBlock* pResBlock;
|
2023-05-12 05:46:16 +00:00
|
|
|
SHashObj* pIgnoreTables;
|
2024-07-17 11:35:35 +00:00
|
|
|
SSampleExecInfo sample; // sample execution info
|
|
|
|
|
int32_t tableStartIndex; // current group scan start
|
|
|
|
|
int32_t tableEndIndex; // current group scan end
|
2024-01-16 01:28:45 +00:00
|
|
|
int32_t currentGroupId;
|
2024-07-17 11:35:35 +00:00
|
|
|
int32_t currentTable;
|
2023-04-28 03:42:34 +00:00
|
|
|
int8_t scanMode;
|
|
|
|
|
int8_t assignBlockUid;
|
2024-07-17 11:35:35 +00:00
|
|
|
uint8_t countState; // empty table count state
|
2023-04-28 03:42:34 +00:00
|
|
|
bool hasGroupByTag;
|
2023-12-06 02:45:12 +00:00
|
|
|
bool filesetDelimited;
|
2023-12-13 15:25:37 +00:00
|
|
|
bool needCountEmptyTable;
|
2025-12-23 08:44:28 +00:00
|
|
|
// for virtual super table scan
|
2025-03-15 06:10:46 +00:00
|
|
|
SSDataBlock* pOrgBlock;
|
|
|
|
|
bool ignoreTag;
|
|
|
|
|
bool virtualStableScan;
|
2025-10-17 05:18:37 +00:00
|
|
|
SHashObj* readerCache;
|
|
|
|
|
bool newReader;
|
2025-12-03 08:42:34 +00:00
|
|
|
SArray* pBlockColMap;
|
2025-12-23 08:44:28 +00:00
|
|
|
// for virtual super table batch scan
|
|
|
|
|
int32_t lastBatchIdx;
|
|
|
|
|
int32_t currentBatchIdx;
|
|
|
|
|
STimeWindow lastTimeWindow;
|
|
|
|
|
SArray* lastColArray;
|
|
|
|
|
SArray* lastBlockColArray;
|
|
|
|
|
SArray* pBatchColMap; // SArray<SOrgTbInfo>
|
|
|
|
|
STimeWindow cachedTimeWindow;
|
|
|
|
|
SArray* cachedTagList;
|
|
|
|
|
uint64_t cachedGroupId;
|
2023-04-28 03:42:34 +00:00
|
|
|
} STableScanInfo;
|
|
|
|
|
|
2024-01-23 08:34:14 +00:00
|
|
|
typedef enum ESubTableInputType {
|
|
|
|
|
SUB_TABLE_MEM_BLOCK,
|
|
|
|
|
SUB_TABLE_EXT_PAGES,
|
|
|
|
|
} ESubTableInputType;
|
|
|
|
|
|
|
|
|
|
typedef struct STmsSubTableInput {
|
2024-07-17 11:35:35 +00:00
|
|
|
STsdbReader* pReader;
|
2024-01-26 06:10:02 +00:00
|
|
|
SQueryTableDataCond tblCond;
|
2024-07-17 11:35:35 +00:00
|
|
|
STableKeyInfo* pKeyInfo;
|
|
|
|
|
bool bInMemReader;
|
|
|
|
|
ESubTableInputType type;
|
|
|
|
|
SSDataBlock* pReaderBlock;
|
2024-01-24 09:16:18 +00:00
|
|
|
|
2024-07-17 11:35:35 +00:00
|
|
|
SArray* aBlockPages;
|
2024-01-24 09:16:18 +00:00
|
|
|
SSDataBlock* pPageBlock;
|
2024-07-17 11:35:35 +00:00
|
|
|
int32_t pageIdx;
|
2024-02-02 07:00:09 +00:00
|
|
|
|
2024-07-17 11:35:35 +00:00
|
|
|
int32_t rowIdx;
|
|
|
|
|
int64_t* aTs;
|
2024-03-22 07:48:36 +00:00
|
|
|
SSDataBlock* pInputBlock;
|
2024-01-23 08:34:14 +00:00
|
|
|
} STmsSubTableInput;
|
|
|
|
|
|
2024-01-24 02:21:17 +00:00
|
|
|
typedef struct SBlockOrderInfo SBlockOrderInfo;
|
2024-01-23 08:34:14 +00:00
|
|
|
typedef struct STmsSubTablesMergeInfo {
|
2024-03-22 07:48:36 +00:00
|
|
|
SBlockOrderInfo* pTsOrderInfo;
|
|
|
|
|
SBlockOrderInfo* pPkOrderInfo;
|
2024-01-23 08:34:14 +00:00
|
|
|
|
2024-07-17 11:35:35 +00:00
|
|
|
int32_t numSubTables;
|
|
|
|
|
STmsSubTableInput* aInputs;
|
2024-01-23 08:34:14 +00:00
|
|
|
SMultiwayMergeTreeInfo* pTree;
|
2024-07-17 11:35:35 +00:00
|
|
|
int32_t numSubTablesCompleted;
|
2024-01-23 08:34:14 +00:00
|
|
|
|
|
|
|
|
int32_t numTableBlocksInMem;
|
|
|
|
|
SDiskbasedBuf* pBlocksBuf;
|
2024-01-26 06:10:02 +00:00
|
|
|
|
|
|
|
|
int32_t numInMemReaders;
|
2024-01-23 08:34:14 +00:00
|
|
|
} STmsSubTablesMergeInfo;
|
|
|
|
|
|
2023-04-28 03:42:34 +00:00
|
|
|
typedef struct STableMergeScanInfo {
|
|
|
|
|
int32_t tableStartIndex;
|
|
|
|
|
int32_t tableEndIndex;
|
|
|
|
|
bool hasGroupId;
|
|
|
|
|
uint64_t groupId;
|
|
|
|
|
STableScanBase base;
|
|
|
|
|
int32_t bufPageSize;
|
|
|
|
|
uint32_t sortBufSize; // max buffer size for in-memory sort
|
|
|
|
|
SArray* pSortInfo;
|
|
|
|
|
SSortHandle* pSortHandle;
|
|
|
|
|
SSDataBlock* pSortInputBlock;
|
2023-07-16 12:28:54 +00:00
|
|
|
SSDataBlock* pReaderBlock;
|
2023-04-28 03:42:34 +00:00
|
|
|
int64_t startTs; // sort start time
|
|
|
|
|
SLimitInfo limitInfo;
|
|
|
|
|
int64_t numOfRows;
|
|
|
|
|
SScanInfo scanInfo;
|
|
|
|
|
int32_t scanTimes;
|
2023-07-16 09:54:39 +00:00
|
|
|
int32_t readIdx;
|
2023-04-28 03:42:34 +00:00
|
|
|
SSDataBlock* pResBlock;
|
2024-04-11 11:35:14 +00:00
|
|
|
SSampleExecInfo sample; // sample execution info
|
|
|
|
|
SSHashObj* mTableNumRows; // uid->num of table rows
|
|
|
|
|
SHashObj* mSkipTables;
|
|
|
|
|
int64_t mergeLimit;
|
2023-04-28 03:42:34 +00:00
|
|
|
SSortExecInfo sortExecInfo;
|
2024-04-11 11:35:14 +00:00
|
|
|
bool needCountEmptyTable;
|
|
|
|
|
bool bGroupProcessed; // the group return data means processed
|
|
|
|
|
bool filesetDelimited;
|
|
|
|
|
bool bNewFilesetEvent;
|
|
|
|
|
bool bNextDurationBlockEvent;
|
|
|
|
|
int32_t numNextDurationBlocks;
|
|
|
|
|
SSDataBlock* nextDurationBlocks[2];
|
|
|
|
|
bool rtnNextDurationBlocks;
|
|
|
|
|
int32_t nextDurationBlocksIdx;
|
|
|
|
|
bool bSortRowId;
|
2024-01-23 08:34:14 +00:00
|
|
|
|
|
|
|
|
STmsSubTablesMergeInfo* pSubTablesMergeInfo;
|
2023-04-28 03:42:34 +00:00
|
|
|
} STableMergeScanInfo;
|
|
|
|
|
|
2023-08-15 08:10:54 +00:00
|
|
|
typedef struct STagScanFilterContext {
|
|
|
|
|
SHashObj* colHash;
|
|
|
|
|
int32_t index;
|
|
|
|
|
SArray* cInfoList;
|
2024-07-21 10:20:30 +00:00
|
|
|
int32_t code;
|
2023-08-15 08:10:54 +00:00
|
|
|
} STagScanFilterContext;
|
|
|
|
|
|
2023-04-28 03:42:34 +00:00
|
|
|
typedef struct STagScanInfo {
|
2023-08-18 07:27:02 +00:00
|
|
|
SColumnInfo* pCols;
|
|
|
|
|
SSDataBlock* pRes;
|
|
|
|
|
SColMatchInfo matchInfo;
|
|
|
|
|
int32_t curPos;
|
|
|
|
|
SReadHandle readHandle;
|
|
|
|
|
STableListInfo* pTableListInfo;
|
|
|
|
|
uint64_t suid;
|
|
|
|
|
void* pCtbCursor;
|
|
|
|
|
SNode* pTagCond;
|
|
|
|
|
SNode* pTagIndexCond;
|
2023-08-15 08:10:54 +00:00
|
|
|
STagScanFilterContext filterCtx;
|
2023-08-18 07:27:02 +00:00
|
|
|
SArray* aUidTags; // SArray<STUidTagInfo>
|
|
|
|
|
SArray* aFilterIdxs; // SArray<int32_t>
|
|
|
|
|
SStorageAPI* pStorageAPI;
|
2024-07-17 11:35:35 +00:00
|
|
|
SLimitInfo limitInfo;
|
2023-04-28 03:42:34 +00:00
|
|
|
} STagScanInfo;
|
|
|
|
|
|
|
|
|
|
typedef enum EStreamScanMode {
|
|
|
|
|
STREAM_SCAN_FROM_READERHANDLE = 1,
|
|
|
|
|
STREAM_SCAN_FROM_RES,
|
|
|
|
|
STREAM_SCAN_FROM_UPDATERES,
|
|
|
|
|
STREAM_SCAN_FROM_DELETE_DATA,
|
|
|
|
|
STREAM_SCAN_FROM_DATAREADER_RETRIEVE,
|
|
|
|
|
STREAM_SCAN_FROM_DATAREADER_RANGE,
|
2025-03-14 12:14:01 +00:00
|
|
|
STREAM_SCAN_FROM_CREATE_TABLERES,
|
2023-04-28 03:42:34 +00:00
|
|
|
} EStreamScanMode;
|
|
|
|
|
|
|
|
|
|
enum {
|
|
|
|
|
PROJECT_RETRIEVE_CONTINUE = 0x1,
|
|
|
|
|
PROJECT_RETRIEVE_DONE = 0x2,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
typedef struct SPartitionBySupporter {
|
|
|
|
|
SArray* pGroupCols; // group by columns, SArray<SColumn>
|
|
|
|
|
SArray* pGroupColVals; // current group column values, SArray<SGroupKeys>
|
|
|
|
|
char* keyBuf; // group by keys for hash
|
|
|
|
|
bool needCalc; // partition by column
|
|
|
|
|
} SPartitionBySupporter;
|
|
|
|
|
|
|
|
|
|
typedef struct SPartitionDataInfo {
|
|
|
|
|
uint64_t groupId;
|
|
|
|
|
char* tbname;
|
|
|
|
|
SArray* rowIds;
|
|
|
|
|
} SPartitionDataInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct STimeWindowAggSupp {
|
|
|
|
|
TSKEY maxTs;
|
|
|
|
|
TSKEY minTs;
|
|
|
|
|
SColumnInfoData timeWindowData; // query time window info for scalar function execution.
|
|
|
|
|
} STimeWindowAggSupp;
|
|
|
|
|
|
2025-01-16 00:43:47 +00:00
|
|
|
typedef struct SStreamNotifyEventSupp {
|
2025-02-12 15:33:15 +00:00
|
|
|
SHashObj* pWindowEventHashMap; // Hash map from gorupid+skey+eventType to the list node of window event.
|
|
|
|
|
SHashObj* pTableNameHashMap; // Hash map from groupid to the dest child table name.
|
|
|
|
|
SSDataBlock* pEventBlock; // The datablock contains all window events and results.
|
|
|
|
|
SArray* pSessionKeys;
|
|
|
|
|
const char* windowType;
|
2025-01-16 00:43:47 +00:00
|
|
|
} SStreamNotifyEventSupp;
|
|
|
|
|
|
2024-05-16 08:24:58 +00:00
|
|
|
typedef struct SSteamOpBasicInfo {
|
2025-03-14 12:14:01 +00:00
|
|
|
int16_t operatorFlag;
|
2025-02-12 15:33:15 +00:00
|
|
|
SStreamNotifyEventSupp notifyEventSup;
|
2025-03-14 12:14:01 +00:00
|
|
|
bool recvCkBlock;
|
|
|
|
|
SSDataBlock* pCheckpointRes;
|
|
|
|
|
SSHashObj* pSeDeleted;
|
|
|
|
|
void* pDelIterator;
|
|
|
|
|
SSDataBlock* pDelRes;
|
|
|
|
|
SArray* pUpdated;
|
|
|
|
|
STableTsDataState* pTsDataState;
|
|
|
|
|
int32_t numOfRecv;
|
2024-05-16 08:24:58 +00:00
|
|
|
} SSteamOpBasicInfo;
|
|
|
|
|
|
2024-08-16 02:54:52 +00:00
|
|
|
typedef struct SStreamFillSupporter {
|
|
|
|
|
int32_t type; // fill type
|
|
|
|
|
SInterval interval;
|
|
|
|
|
SResultRowData prev;
|
|
|
|
|
TSKEY prevOriginKey;
|
|
|
|
|
SResultRowData cur;
|
|
|
|
|
SResultRowData next;
|
|
|
|
|
TSKEY nextOriginKey;
|
|
|
|
|
SResultRowData nextNext;
|
|
|
|
|
SFillColInfo* pAllColInfo; // fill exprs and not fill exprs
|
|
|
|
|
SExprSupp notFillExprSup;
|
|
|
|
|
int32_t numOfAllCols; // number of all exprs, including the tags columns
|
|
|
|
|
int32_t numOfFillCols;
|
|
|
|
|
int32_t numOfNotFillCols;
|
|
|
|
|
int32_t rowSize;
|
|
|
|
|
SSHashObj* pResMap;
|
|
|
|
|
bool hasDelete;
|
|
|
|
|
SStorageAPI* pAPI;
|
|
|
|
|
STimeWindow winRange;
|
2024-09-18 03:08:47 +00:00
|
|
|
int32_t pkColBytes;
|
|
|
|
|
__compar_fn_t comparePkColFn;
|
2024-11-26 07:23:57 +00:00
|
|
|
int32_t* pOffsetInfo;
|
2025-03-14 12:14:01 +00:00
|
|
|
bool normalFill;
|
|
|
|
|
void* pEmptyRow;
|
|
|
|
|
SArray* pResultRange;
|
2024-08-16 02:54:52 +00:00
|
|
|
} SStreamFillSupporter;
|
|
|
|
|
|
2023-04-28 03:42:34 +00:00
|
|
|
typedef struct SStreamScanInfo {
|
2024-05-16 08:24:58 +00:00
|
|
|
SSteamOpBasicInfo basic;
|
|
|
|
|
SExprInfo* pPseudoExpr;
|
|
|
|
|
int32_t numOfPseudoExpr;
|
|
|
|
|
SExprSupp tbnameCalSup;
|
|
|
|
|
SExprSupp* pPartTbnameSup;
|
|
|
|
|
SExprSupp tagCalSup;
|
|
|
|
|
int32_t primaryTsIndex; // primary time stamp slot id
|
|
|
|
|
SReadHandle readHandle;
|
|
|
|
|
SInterval interval; // if the upstream is an interval operator, the interval info is also kept here.
|
|
|
|
|
SColMatchInfo matchInfo;
|
2026-02-26 09:06:07 +00:00
|
|
|
SHashObj* pCol2SlotId;
|
2023-04-28 03:42:34 +00:00
|
|
|
|
|
|
|
|
SArray* pBlockLists; // multiple SSDatablock.
|
|
|
|
|
SSDataBlock* pRes; // result SSDataBlock
|
|
|
|
|
int32_t updateResIndex;
|
|
|
|
|
int32_t blockType; // current block type
|
|
|
|
|
int32_t validBlockIndex; // Is current data has returned?
|
|
|
|
|
uint64_t numOfExec; // execution times
|
|
|
|
|
STqReader* tqReader;
|
|
|
|
|
|
2025-03-20 07:56:35 +00:00
|
|
|
SHashObj* pVtableMergeHandles; // key: vtable uid, value: SStreamVtableMergeHandle
|
|
|
|
|
SDiskbasedBuf* pVtableMergeBuf; // page buffer used by vtable merge
|
|
|
|
|
SArray* pVtableReadyHandles;
|
|
|
|
|
STableListInfo* pTableListInfo;
|
2025-03-15 09:06:48 +00:00
|
|
|
|
2023-07-10 03:07:08 +00:00
|
|
|
uint64_t groupId;
|
2024-08-06 08:14:15 +00:00
|
|
|
bool igCheckGroupId;
|
2023-05-23 10:29:23 +00:00
|
|
|
struct SUpdateInfo* pUpdateInfo;
|
2023-04-28 03:42:34 +00:00
|
|
|
|
|
|
|
|
EStreamScanMode scanMode;
|
2023-07-10 03:07:08 +00:00
|
|
|
struct SOperatorInfo* pStreamScanOp;
|
|
|
|
|
struct SOperatorInfo* pTableScanOp;
|
2023-04-28 03:42:34 +00:00
|
|
|
SArray* childIds;
|
|
|
|
|
SPartitionBySupporter partitionSup;
|
|
|
|
|
SExprSupp* pPartScalarSup;
|
|
|
|
|
bool assignBlockUid; // assign block uid to groupId, temporarily used for generating rollup SMA.
|
|
|
|
|
int32_t scanWinIndex; // for state operator
|
|
|
|
|
SSDataBlock* pDeleteDataRes; // delete data SSDataBlock
|
|
|
|
|
int32_t deleteDataIndex;
|
|
|
|
|
STimeWindow updateWin;
|
|
|
|
|
STimeWindowAggSupp twAggSup;
|
|
|
|
|
SSDataBlock* pUpdateDataRes;
|
2024-08-16 02:54:52 +00:00
|
|
|
SStreamFillSupporter* pFillSup;
|
2023-04-28 03:42:34 +00:00
|
|
|
// status for tmq
|
|
|
|
|
SNodeList* pGroupTags;
|
|
|
|
|
SNode* pTagCond;
|
|
|
|
|
SNode* pTagIndexCond;
|
|
|
|
|
|
|
|
|
|
// recover
|
|
|
|
|
int32_t blockRecoverTotCnt;
|
|
|
|
|
SSDataBlock* pRecoverRes;
|
|
|
|
|
|
2025-03-14 12:14:01 +00:00
|
|
|
SSDataBlock* pCreateTbRes;
|
|
|
|
|
int8_t igCheckUpdate;
|
|
|
|
|
int8_t igExpired;
|
|
|
|
|
void* pState; // void
|
|
|
|
|
SStoreTqReader readerFn;
|
|
|
|
|
SSDataBlock* pCheckpointRes;
|
|
|
|
|
int8_t pkColType;
|
|
|
|
|
int32_t pkColLen;
|
|
|
|
|
bool useGetResultRange;
|
|
|
|
|
STimeWindow lastScanRange;
|
|
|
|
|
SSDataBlock* pRangeScanRes; // update SSDataBlock
|
|
|
|
|
bool hasPart;
|
|
|
|
|
|
|
|
|
|
//nonblock data scan
|
|
|
|
|
TSKEY recalculateInterval;
|
|
|
|
|
__compar_fn_t comparePkColFn;
|
|
|
|
|
SScanRange curRange;
|
|
|
|
|
struct SOperatorInfo* pRecTableScanOp;
|
|
|
|
|
bool scanAllTables;
|
|
|
|
|
SSHashObj* pRecRangeMap;
|
|
|
|
|
SArray* pRecRangeRes;
|
2023-04-28 03:42:34 +00:00
|
|
|
} SStreamScanInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2023-05-23 10:29:23 +00:00
|
|
|
struct SVnode* vnode; // todo remove this
|
|
|
|
|
SSDataBlock pRes; // result SSDataBlock
|
|
|
|
|
STsdbReader* dataReader;
|
|
|
|
|
struct SSnapContext* sContext;
|
|
|
|
|
SStorageAPI* pAPI;
|
|
|
|
|
STableListInfo* pTableListInfo;
|
2023-04-28 03:42:34 +00:00
|
|
|
} SStreamRawScanInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct STableCountScanSupp {
|
|
|
|
|
int16_t dbNameSlotId;
|
|
|
|
|
int16_t stbNameSlotId;
|
|
|
|
|
int16_t tbCountSlotId;
|
|
|
|
|
bool groupByDbName;
|
|
|
|
|
bool groupByStbName;
|
|
|
|
|
char dbNameFilter[TSDB_DB_NAME_LEN];
|
|
|
|
|
char stbNameFilter[TSDB_TABLE_NAME_LEN];
|
|
|
|
|
} STableCountScanSupp;
|
|
|
|
|
|
|
|
|
|
typedef struct SOptrBasicInfo {
|
|
|
|
|
SResultRowInfo resultRowInfo;
|
|
|
|
|
SSDataBlock* pRes;
|
|
|
|
|
bool mergeResultBlock;
|
2023-06-16 02:26:09 +00:00
|
|
|
int32_t inputTsOrder;
|
|
|
|
|
int32_t outputTsOrder;
|
2023-04-28 03:42:34 +00:00
|
|
|
} SOptrBasicInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct SIntervalAggOperatorInfo {
|
|
|
|
|
SOptrBasicInfo binfo; // basic info
|
|
|
|
|
SAggSupporter aggSup; // aggregate supporter
|
|
|
|
|
SExprSupp scalarSupp; // supporter for perform scalar function
|
|
|
|
|
SGroupResInfo groupResInfo; // multiple results build supporter
|
|
|
|
|
SInterval interval; // interval info
|
|
|
|
|
int32_t primaryTsIndex; // primary time stamp slot id from result of downstream operator.
|
|
|
|
|
STimeWindow win; // query time range
|
|
|
|
|
bool timeWindowInterpo; // interpolation needed or not
|
|
|
|
|
SArray* pInterpCols; // interpolation columns
|
|
|
|
|
EOPTR_EXEC_MODEL execModel; // operator execution model [batch model|stream model]
|
|
|
|
|
STimeWindowAggSupp twAggSup;
|
|
|
|
|
SArray* pPrevValues; // SArray<SGroupKeys> used to keep the previous not null value for interpolation.
|
2024-10-31 09:11:34 +00:00
|
|
|
bool cleanGroupResInfo;
|
2024-09-20 03:25:39 +00:00
|
|
|
struct SOperatorInfo* pOperator;
|
2023-08-03 10:05:52 +00:00
|
|
|
// for limit optimization
|
|
|
|
|
bool limited;
|
|
|
|
|
int64_t limit;
|
|
|
|
|
bool slimited;
|
|
|
|
|
int64_t slimit;
|
2023-08-18 07:27:02 +00:00
|
|
|
uint64_t curGroupId; // initialize to UINT64_MAX
|
2023-08-03 10:05:52 +00:00
|
|
|
uint64_t handledGroupNum;
|
|
|
|
|
BoundedQueue* pBQ;
|
2023-04-28 03:42:34 +00:00
|
|
|
} SIntervalAggOperatorInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct SMergeAlignedIntervalAggOperatorInfo {
|
|
|
|
|
SIntervalAggOperatorInfo* intervalAggOperatorInfo;
|
|
|
|
|
|
|
|
|
|
uint64_t groupId; // current groupId
|
|
|
|
|
int64_t curTs; // current ts
|
|
|
|
|
SSDataBlock* prefetchedBlock;
|
|
|
|
|
SResultRow* pResultRow;
|
|
|
|
|
} SMergeAlignedIntervalAggOperatorInfo;
|
|
|
|
|
|
2023-07-06 06:28:34 +00:00
|
|
|
typedef struct SOpCheckPointInfo {
|
|
|
|
|
uint16_t checkPointId;
|
2023-08-18 07:27:02 +00:00
|
|
|
SHashObj* children; // key:child id
|
2023-07-06 06:28:34 +00:00
|
|
|
} SOpCheckPointInfo;
|
|
|
|
|
|
2023-04-28 03:42:34 +00:00
|
|
|
typedef struct SDataGroupInfo {
|
|
|
|
|
uint64_t groupId;
|
|
|
|
|
int64_t numOfRows;
|
|
|
|
|
SArray* pPageList;
|
2024-06-07 08:49:29 +00:00
|
|
|
SArray* blockForNotLoaded; // SSDataBlock that data is not loaded
|
|
|
|
|
int32_t offsetForNotLoaded; // read offset for SSDataBlock that data is not loaded
|
2023-04-28 03:42:34 +00:00
|
|
|
} SDataGroupInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct SWindowRowsSup {
|
|
|
|
|
STimeWindow win;
|
2026-01-14 01:40:16 +00:00
|
|
|
TSKEY prevTs; // previous timestamp, used for window aggregation
|
2023-04-28 03:42:34 +00:00
|
|
|
int32_t startRowIndex;
|
|
|
|
|
int32_t numOfRows;
|
|
|
|
|
uint64_t groupId;
|
2025-09-22 05:52:52 +00:00
|
|
|
uint32_t numNullRows; // number of continuous rows with null state col
|
2026-01-14 01:40:16 +00:00
|
|
|
TSKEY lastTs; // last row's timestamp, used for checking duplicated ts
|
2023-04-28 03:42:34 +00:00
|
|
|
} SWindowRowsSup;
|
|
|
|
|
|
2025-09-22 05:52:52 +00:00
|
|
|
// return true if there are continuous rows with null state col
|
2025-10-28 06:40:40 +00:00
|
|
|
// state window operator needs to handle these rows specially
|
2025-09-22 05:52:52 +00:00
|
|
|
static inline bool hasContinuousNullRows(SWindowRowsSup* pRowSup) {
|
|
|
|
|
return pRowSup->numNullRows > 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// reset on initialization or found of a row with non-null state col
|
|
|
|
|
static inline void resetNumNullRows(SWindowRowsSup* pRowSup) {
|
|
|
|
|
pRowSup->numNullRows = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-06 01:14:24 +00:00
|
|
|
static inline void resetWindowRowsSup(SWindowRowsSup* pRowSup) {
|
|
|
|
|
if (NULL == pRowSup) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pRowSup->win.skey = pRowSup->win.ekey = 0;
|
2025-12-05 06:37:27 +00:00
|
|
|
pRowSup->prevTs = INT64_MIN;
|
|
|
|
|
pRowSup->startRowIndex = pRowSup->groupId = 0;
|
|
|
|
|
pRowSup->numOfRows = pRowSup->numNullRows = 0;
|
2025-11-06 01:14:24 +00:00
|
|
|
}
|
|
|
|
|
|
2025-03-14 12:14:01 +00:00
|
|
|
typedef int32_t (*AggImplFn)(struct SOperatorInfo* pOperator, SSDataBlock* pBlock);
|
|
|
|
|
|
2025-02-23 13:46:11 +00:00
|
|
|
typedef struct SSessionAggOperatorInfo {
|
|
|
|
|
SOptrBasicInfo binfo;
|
|
|
|
|
SAggSupporter aggSup;
|
|
|
|
|
SExprSupp scalarSupp; // supporter for perform scalar function
|
|
|
|
|
SGroupResInfo groupResInfo;
|
|
|
|
|
SWindowRowsSup winSup;
|
|
|
|
|
bool reptScan; // next round scan
|
|
|
|
|
int64_t gap; // session window gap
|
|
|
|
|
int32_t tsSlotId; // primary timestamp slot id
|
|
|
|
|
STimeWindowAggSupp twAggSup;
|
|
|
|
|
struct SOperatorInfo* pOperator;
|
|
|
|
|
bool cleanGroupResInfo;
|
|
|
|
|
} SSessionAggOperatorInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct SStateWindowOperatorInfo {
|
|
|
|
|
SOptrBasicInfo binfo;
|
|
|
|
|
SAggSupporter aggSup;
|
|
|
|
|
SExprSupp scalarSup;
|
|
|
|
|
SGroupResInfo groupResInfo;
|
|
|
|
|
SWindowRowsSup winSup;
|
2025-11-06 01:14:24 +00:00
|
|
|
SColumn stateCol;
|
2026-01-14 01:40:16 +00:00
|
|
|
bool hasKey; // has key means the state window has started
|
2025-02-23 13:46:11 +00:00
|
|
|
SStateKeys stateKey;
|
|
|
|
|
int32_t tsSlotId; // primary timestamp column slot id
|
|
|
|
|
STimeWindowAggSupp twAggSup;
|
|
|
|
|
struct SOperatorInfo* pOperator;
|
|
|
|
|
bool cleanGroupResInfo;
|
2026-01-29 06:54:28 +00:00
|
|
|
STrueForInfo trueForInfo;
|
2025-09-22 05:52:52 +00:00
|
|
|
EStateWinExtendOption extendOption;
|
2025-02-23 13:46:11 +00:00
|
|
|
} SStateWindowOperatorInfo;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct SEventWindowOperatorInfo {
|
|
|
|
|
SOptrBasicInfo binfo;
|
|
|
|
|
SAggSupporter aggSup;
|
|
|
|
|
SExprSupp scalarSup;
|
|
|
|
|
SWindowRowsSup winSup;
|
|
|
|
|
int32_t tsSlotId; // primary timestamp column slot id
|
|
|
|
|
STimeWindowAggSupp twAggSup;
|
|
|
|
|
uint64_t groupId; // current group id, used to identify the data block from different groups
|
|
|
|
|
SFilterInfo* pStartCondInfo;
|
|
|
|
|
SFilterInfo* pEndCondInfo;
|
|
|
|
|
bool inWindow;
|
|
|
|
|
SResultRow* pRow;
|
|
|
|
|
SSDataBlock* pPreDataBlock;
|
|
|
|
|
struct SOperatorInfo* pOperator;
|
2026-01-29 06:54:28 +00:00
|
|
|
STrueForInfo trueForInfo;
|
2025-02-23 13:46:11 +00:00
|
|
|
} SEventWindowOperatorInfo;
|
|
|
|
|
|
2023-04-28 03:42:34 +00:00
|
|
|
#define OPTR_IS_OPENED(_optr) (((_optr)->status & OP_OPENED) == OP_OPENED)
|
|
|
|
|
#define OPTR_SET_OPENED(_optr) ((_optr)->status |= OP_OPENED)
|
2025-07-16 06:42:16 +00:00
|
|
|
#define OPTR_CLR_OPENED(_optr) ((_optr)->status &= ~OP_OPENED)
|
2023-04-28 03:42:34 +00:00
|
|
|
|
|
|
|
|
SSchemaWrapper* extractQueriedColumnSchema(SScanPhysiNode* pScanNode);
|
2023-08-21 01:12:40 +00:00
|
|
|
|
|
|
|
|
int32_t initQueriedTableSchemaInfo(SReadHandle* pHandle, SScanPhysiNode* pScanNode, const char* dbName,
|
|
|
|
|
SExecTaskInfo* pTaskInfo);
|
2023-08-11 09:39:41 +00:00
|
|
|
void cleanupQueriedTableScanInfo(void* p);
|
2023-04-28 03:42:34 +00:00
|
|
|
|
|
|
|
|
void initBasicInfo(SOptrBasicInfo* pInfo, SSDataBlock* pBlock);
|
|
|
|
|
void cleanupBasicInfo(SOptrBasicInfo* pInfo);
|
|
|
|
|
|
2023-05-25 06:21:40 +00:00
|
|
|
int32_t initExprSupp(SExprSupp* pSup, SExprInfo* pExprInfo, int32_t numOfExpr, SFunctionStateStore* pStore);
|
2025-09-25 07:48:14 +00:00
|
|
|
void checkIndefRowsFuncs(SExprSupp* pSup);
|
2023-04-28 03:42:34 +00:00
|
|
|
void cleanupExprSupp(SExprSupp* pSup);
|
2025-07-16 06:42:16 +00:00
|
|
|
void cleanupExprSuppWithoutFilter(SExprSupp* pSupp);
|
2023-04-28 03:42:34 +00:00
|
|
|
|
2024-10-31 09:11:34 +00:00
|
|
|
void cleanupResultInfoInHashMap(SExecTaskInfo* pTaskInfo, SExprSupp* pSup, SDiskbasedBuf* pBuf,
|
|
|
|
|
SGroupResInfo* pGroupResInfo, SSHashObj* pHashmap);
|
|
|
|
|
void cleanupResultInfo(SExecTaskInfo* pTaskInfo, SExprSupp* pSup, SGroupResInfo* pGroupResInfo,
|
|
|
|
|
SAggSupporter *pAggSup, bool cleanHashmap);
|
2024-09-30 03:16:42 +00:00
|
|
|
void cleanupResultInfoWithoutHash(SExecTaskInfo* pTaskInfo, SExprSupp* pSup, SDiskbasedBuf* pBuf,
|
|
|
|
|
SGroupResInfo* pGroupResInfo);
|
|
|
|
|
|
2023-04-28 03:42:34 +00:00
|
|
|
int32_t initAggSup(SExprSupp* pSup, SAggSupporter* pAggSup, SExprInfo* pExprInfo, int32_t numOfCols, size_t keyBufSize,
|
2023-05-25 06:21:40 +00:00
|
|
|
const char* pkey, void* pState, SFunctionStateStore* pStore);
|
2023-04-28 03:42:34 +00:00
|
|
|
void cleanupAggSup(SAggSupporter* pAggSup);
|
|
|
|
|
|
|
|
|
|
void initResultSizeInfo(SResultInfo* pResultInfo, int32_t numOfRows);
|
|
|
|
|
|
|
|
|
|
void doBuildResultDatablock(struct SOperatorInfo* pOperator, SOptrBasicInfo* pbInfo, SGroupResInfo* pGroupResInfo,
|
|
|
|
|
SDiskbasedBuf* pBuf);
|
|
|
|
|
|
2023-11-06 11:35:48 +00:00
|
|
|
/**
|
|
|
|
|
* @brief copydata from hash table, instead of copying from SGroupResInfo's pRow
|
|
|
|
|
*/
|
2024-07-22 04:51:25 +00:00
|
|
|
void doCopyToSDataBlockByHash(SExecTaskInfo* pTaskInfo, SSDataBlock* pBlock, SExprSupp* pSup, SDiskbasedBuf* pBuf,
|
|
|
|
|
SGroupResInfo* pGroupResInfo, SSHashObj* pHashmap, int32_t threshold, bool ignoreGroup);
|
2025-09-26 09:32:32 +00:00
|
|
|
void doCopyToSDataBlock(SExecTaskInfo* pTaskInfo, SSDataBlock* pBlock, SExprSupp* pSup, SDiskbasedBuf* pBuf,
|
2026-01-29 06:54:28 +00:00
|
|
|
SGroupResInfo* pGroupResInfo, int32_t threshold, bool ignoreGroup, STrueForInfo *pTrueForInfo);
|
2023-11-06 11:35:48 +00:00
|
|
|
|
2023-04-28 03:42:34 +00:00
|
|
|
bool hasLimitOffsetInfo(SLimitInfo* pLimitInfo);
|
|
|
|
|
bool hasSlimitOffsetInfo(SLimitInfo* pLimitInfo);
|
|
|
|
|
void initLimitInfo(const SNode* pLimit, const SNode* pSLimit, SLimitInfo* pLimitInfo);
|
|
|
|
|
void resetLimitInfoForNextGroup(SLimitInfo* pLimitInfo);
|
|
|
|
|
bool applyLimitOffset(SLimitInfo* pLimitInfo, SSDataBlock* pBlock, SExecTaskInfo* pTaskInfo);
|
|
|
|
|
|
2024-09-23 03:19:10 +00:00
|
|
|
int32_t applyAggFunctionOnPartialTuples(SExecTaskInfo* taskInfo, SqlFunctionCtx* pCtx, SColumnInfoData* pTimeWindowData,
|
|
|
|
|
int32_t offset, int32_t forwardStep, int32_t numOfTotal, int32_t numOfOutput);
|
2023-04-28 03:42:34 +00:00
|
|
|
|
2025-07-23 09:11:16 +00:00
|
|
|
int32_t setFunctionResultOutput(struct SOperatorInfo* pOperator, SOptrBasicInfo* pInfo, SAggSupporter* pSup, int32_t stage,
|
|
|
|
|
int32_t numOfExprs);
|
|
|
|
|
int32_t setRowTsColumnOutputInfo(SqlFunctionCtx* pCtx, int32_t numOfCols, SArray** pResList);
|
2026-02-02 09:27:02 +00:00
|
|
|
int32_t extractDataBlockFromFetchRsp(SSDataBlock* pRes, char* pData, SArray* pColList, char** pNextStart, bool isVstbScan);
|
2023-04-28 03:42:34 +00:00
|
|
|
void updateLoadRemoteInfo(SLoadRemoteDataInfo* pInfo, int64_t numOfRows, int32_t dataLen, int64_t startTs,
|
|
|
|
|
struct SOperatorInfo* pOperator);
|
|
|
|
|
|
|
|
|
|
STimeWindow getFirstQualifiedTimeWindow(int64_t ts, STimeWindow* pWindow, SInterval* pInterval, int32_t order);
|
2024-12-05 10:07:37 +00:00
|
|
|
int32_t getBufferPgSize(int32_t rowSize, uint32_t* defaultPgsz, int64_t* defaultBufsz);
|
2023-04-28 03:42:34 +00:00
|
|
|
|
|
|
|
|
extern void doDestroyExchangeOperatorInfo(void* param);
|
|
|
|
|
|
2025-09-25 07:48:14 +00:00
|
|
|
int32_t doFilter(SSDataBlock* pBlock, SFilterInfo* pFilterInfo, SColMatchInfo* pColMatchInfo, SColumnInfoData** pRet);
|
2023-04-28 03:42:34 +00:00
|
|
|
int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int32_t numOfExpr, SSDataBlock* pBlock,
|
2024-02-01 03:37:57 +00:00
|
|
|
int32_t rows, SExecTaskInfo* pTask, STableMetaCacheInfo* pCache);
|
2023-04-28 03:42:34 +00:00
|
|
|
|
2024-07-24 09:08:08 +00:00
|
|
|
int32_t appendOneRowToDataBlock(SSDataBlock* pBlock, STupleHandle* pTupleHandle);
|
2024-07-17 11:35:35 +00:00
|
|
|
int32_t setResultRowInitCtx(SResultRow* pResult, SqlFunctionCtx* pCtx, int32_t numOfOutput,
|
|
|
|
|
int32_t* rowEntryInfoOffset);
|
|
|
|
|
void clearResultRowInitFlag(SqlFunctionCtx* pCtx, int32_t numOfOutput);
|
2023-04-28 03:42:34 +00:00
|
|
|
|
|
|
|
|
SResultRow* doSetResultOutBufByKey(SDiskbasedBuf* pResultBuf, SResultRowInfo* pResultRowInfo, char* pData,
|
2023-12-11 03:46:15 +00:00
|
|
|
int32_t bytes, bool masterscan, uint64_t groupId, SExecTaskInfo* pTaskInfo,
|
2023-04-28 03:42:34 +00:00
|
|
|
bool isIntervalQuery, SAggSupporter* pSup, bool keepGroup);
|
|
|
|
|
|
|
|
|
|
int32_t projectApplyFunctions(SExprInfo* pExpr, SSDataBlock* pResult, SSDataBlock* pSrcBlock, SqlFunctionCtx* pCtx,
|
2025-07-16 06:42:16 +00:00
|
|
|
int32_t numOfOutput, SArray* pPseudoList, const void* pExtraParams);
|
|
|
|
|
int32_t projectApplyFunctionsWithSelect(SExprInfo* pExpr, SSDataBlock* pResult, SSDataBlock* pSrcBlock,
|
|
|
|
|
SqlFunctionCtx* pCtx, int32_t numOfOutput, SArray* pPseudoList,
|
2025-09-25 07:48:14 +00:00
|
|
|
const void* pExtraParams, bool doSelectFunc, bool hasIndefRowsFunc);
|
2023-04-28 03:42:34 +00:00
|
|
|
|
2024-07-22 04:51:25 +00:00
|
|
|
int32_t setInputDataBlock(SExprSupp* pExprSupp, SSDataBlock* pBlock, int32_t order, int32_t scanFlag,
|
|
|
|
|
bool createDummyCol);
|
2023-04-28 03:42:34 +00:00
|
|
|
|
|
|
|
|
int32_t checkForQueryBuf(size_t numOfTables);
|
|
|
|
|
|
|
|
|
|
int32_t createDataSinkParam(SDataSinkNode* pNode, void** pParam, SExecTaskInfo* pTask, SReadHandle* readHandle);
|
|
|
|
|
|
|
|
|
|
STimeWindow getActiveTimeWindow(SDiskbasedBuf* pBuf, SResultRowInfo* pResultRowInfo, int64_t ts, SInterval* pInterval,
|
|
|
|
|
int32_t order);
|
|
|
|
|
int32_t getNumOfRowsInTimeWindow(SDataBlockInfo* pDataBlockInfo, TSKEY* pPrimaryColumn, int32_t startPos, TSKEY ekey,
|
|
|
|
|
__block_search_fn_t searchFn, STableQueryInfo* item, int32_t order);
|
|
|
|
|
int32_t binarySearchForKey(char* pValue, int num, TSKEY key, int order);
|
|
|
|
|
SResultRow* getNewResultRow(SDiskbasedBuf* pResultBuf, int32_t* currentPageId, int32_t interBufSize);
|
|
|
|
|
bool isInTimeWindow(STimeWindow* pWin, TSKEY ts, int64_t gap);
|
|
|
|
|
bool functionNeedToExecute(SqlFunctionCtx* pCtx);
|
|
|
|
|
bool isOverdue(TSKEY ts, STimeWindowAggSupp* pSup);
|
|
|
|
|
bool isCloseWindow(STimeWindow* pWin, STimeWindowAggSupp* pSup);
|
2024-02-04 08:04:23 +00:00
|
|
|
|
2023-04-28 03:42:34 +00:00
|
|
|
uint64_t calGroupIdByData(SPartitionBySupporter* pParSup, SExprSupp* pExprSup, SSDataBlock* pBlock, int32_t rowId);
|
|
|
|
|
|
2024-07-23 02:50:16 +00:00
|
|
|
void finalizeResultRows(SDiskbasedBuf* pBuf, SResultRowPosition* resultRowPosition, SExprSupp* pSup,
|
2024-07-25 00:51:19 +00:00
|
|
|
SSDataBlock* pBlock, SExecTaskInfo* pTaskInfo);
|
2023-04-28 03:42:34 +00:00
|
|
|
|
|
|
|
|
bool groupbyTbname(SNodeList* pGroupList);
|
|
|
|
|
int32_t getForwardStepsInBlock(int32_t numOfRows, __block_search_fn_t searchFn, TSKEY ekey, int32_t pos, int32_t order,
|
|
|
|
|
int64_t* pData);
|
|
|
|
|
SSDataBlock* buildCreateTableBlock(SExprSupp* tbName, SExprSupp* tag);
|
|
|
|
|
SExprInfo* createExpr(SNodeList* pNodeList, int32_t* numOfExprs);
|
|
|
|
|
|
2024-09-23 03:19:10 +00:00
|
|
|
int32_t copyResultrowToDataBlock(SExprInfo* pExprInfo, int32_t numOfExprs, SResultRow* pRow, SqlFunctionCtx* pCtx,
|
|
|
|
|
SSDataBlock* pBlock, const int32_t* rowEntryOffset, SExecTaskInfo* pTaskInfo);
|
2023-04-28 03:42:34 +00:00
|
|
|
void doUpdateNumOfRows(SqlFunctionCtx* pCtx, SResultRow* pRow, int32_t numOfExprs, const int32_t* rowEntryOffset);
|
|
|
|
|
|
2024-07-30 08:06:40 +00:00
|
|
|
void streamOpReleaseState(struct SOperatorInfo* pOperator);
|
|
|
|
|
void streamOpReloadState(struct SOperatorInfo* pOperator);
|
|
|
|
|
void clearGroupResInfo(SGroupResInfo* pGroupResInfo);
|
|
|
|
|
int32_t initBasicInfoEx(SOptrBasicInfo* pBasicInfo, SExprSupp* pSup, SExprInfo* pExprInfo, int32_t numOfCols,
|
|
|
|
|
SSDataBlock* pResultBlock, SFunctionStateStore* pStore);
|
|
|
|
|
int32_t getMaxTsWins(const SArray* pAllWins, SArray* pMaxWins);
|
|
|
|
|
void initGroupResInfoFromArrayList(SGroupResInfo* pGroupResInfo, SArray* pArrayList);
|
|
|
|
|
void getSessionHashKey(const SSessionKey* pKey, SSessionKey* pHashKey);
|
|
|
|
|
int32_t getAllSessionWindow(SSHashObj* pHashMap, SSHashObj* pStUpdated);
|
|
|
|
|
int32_t closeSessionWindow(SSHashObj* pHashMap, STimeWindowAggSupp* pTwSup, SSHashObj* pClosed);
|
|
|
|
|
int32_t copyUpdateResult(SSHashObj** ppWinUpdated, SArray* pUpdated, __compar_fn_t compar);
|
|
|
|
|
int32_t sessionKeyCompareAsc(const void* pKey1, const void* pKey2);
|
|
|
|
|
void removeSessionDeleteResults(SSHashObj* pHashMap, SArray* pWins);
|
|
|
|
|
int32_t doOneWindowAggImpl(SColumnInfoData* pTimeWindowData, SResultWindowInfo* pCurWin, SResultRow** pResult,
|
|
|
|
|
int32_t startIndex, int32_t winRows, int32_t rows, int32_t numOutput,
|
|
|
|
|
struct SOperatorInfo* pOperator, int64_t winDelta);
|
|
|
|
|
void setSessionWinOutputInfo(SSHashObj* pStUpdated, SResultWindowInfo* pWinInfo);
|
|
|
|
|
int32_t saveResult(SResultWindowInfo winInfo, SSHashObj* pStUpdated);
|
|
|
|
|
int32_t saveDeleteRes(SSHashObj* pStDelete, SSessionKey key);
|
2025-02-23 13:46:11 +00:00
|
|
|
void doBuildDeleteDataBlock(struct SOperatorInfo* pOp, SSHashObj* pStDeleted, SSDataBlock* pBlock, void** Ite,
|
|
|
|
|
SGroupResInfo* pGroupResInfo);
|
2024-07-30 08:06:40 +00:00
|
|
|
void doBuildSessionResult(struct SOperatorInfo* pOperator, void* pState, SGroupResInfo* pGroupResInfo,
|
2025-02-12 15:33:15 +00:00
|
|
|
SSDataBlock* pBlock, SArray* pSessionKeys);
|
2024-07-30 08:06:40 +00:00
|
|
|
void resetWinRange(STimeWindow* winRange);
|
|
|
|
|
int64_t getDeleteMark(SWindowPhysiNode* pWinPhyNode, int64_t interval);
|
|
|
|
|
void resetUnCloseSessionWinInfo(SSHashObj* winMap);
|
|
|
|
|
void setStreamOperatorCompleted(struct SOperatorInfo* pOperator);
|
|
|
|
|
void destroyFlusedPos(void* pRes);
|
|
|
|
|
bool isIrowtsPseudoColumn(SExprInfo* pExprInfo);
|
|
|
|
|
bool isIsfilledPseudoColumn(SExprInfo* pExprInfo);
|
2024-08-02 05:22:14 +00:00
|
|
|
bool isInterpFunc(SExprInfo* pExprInfo);
|
2024-11-28 10:29:20 +00:00
|
|
|
bool isIrowtsOriginPseudoColumn(SExprInfo* pExprInfo);
|
2023-10-25 09:50:16 +00:00
|
|
|
|
|
|
|
|
int32_t encodeSSessionKey(void** buf, SSessionKey* key);
|
|
|
|
|
void* decodeSSessionKey(void* buf, SSessionKey* key);
|
|
|
|
|
int32_t encodeSResultWindowInfo(void** buf, SResultWindowInfo* key, int32_t outLen);
|
|
|
|
|
void* decodeSResultWindowInfo(void* buf, SResultWindowInfo* key, int32_t outLen);
|
|
|
|
|
int32_t encodeSTimeWindowAggSupp(void** buf, STimeWindowAggSupp* pTwAggSup);
|
|
|
|
|
void* decodeSTimeWindowAggSupp(void* buf, STimeWindowAggSupp* pTwAggSup);
|
2023-04-28 03:42:34 +00:00
|
|
|
|
2024-07-24 09:08:08 +00:00
|
|
|
void destroyOperatorParamValue(void* pValues);
|
|
|
|
|
int32_t mergeOperatorParams(SOperatorParam* pDst, SOperatorParam* pSrc);
|
|
|
|
|
int32_t buildTableScanOperatorParam(SOperatorParam** ppRes, SArray* pUidList, int32_t srcOpType, bool tableSeq);
|
2026-01-12 09:32:39 +00:00
|
|
|
int32_t buildTableScanOperatorParamEx(SOperatorParam** ppRes, SArray* pUidList, int32_t srcOpType, SOrgTbInfo *pMap, bool tableSeq, STimeWindow *window, bool isNewParam, ETableScanDynType type);
|
2026-01-16 02:32:01 +00:00
|
|
|
int32_t buildTableScanOperatorParamNotify(SOperatorParam** ppRes,
|
|
|
|
|
int32_t srcOpType, TSKEY notifyTs);
|
2024-07-24 09:08:08 +00:00
|
|
|
void freeExchangeGetBasicOperatorParam(void* pParam);
|
|
|
|
|
void freeResetOperatorParams(struct SOperatorInfo* pOperator, SOperatorParamType type, bool allFree);
|
|
|
|
|
int32_t getNextBlockFromDownstreamImpl(struct SOperatorInfo* pOperator, int32_t idx, bool clearParam,
|
|
|
|
|
SSDataBlock** pResBlock);
|
2023-08-10 03:29:14 +00:00
|
|
|
|
2024-07-17 11:35:35 +00:00
|
|
|
int32_t saveDeleteInfo(SArray* pWins, SSessionKey key);
|
|
|
|
|
int32_t copyDeleteWindowInfo(SArray* pResWins, SSHashObj* pStDeleted);
|
2024-07-18 08:08:01 +00:00
|
|
|
int32_t copyDeleteSessionKey(SSHashObj* source, SSHashObj* dest);
|
2023-08-10 03:29:14 +00:00
|
|
|
|
2025-12-18 08:01:47 +00:00
|
|
|
bool inSlidingWindow(const SInterval* pInterval, const STimeWindow* pWin, const SDataBlockInfo* pBlockInfo);
|
|
|
|
|
bool inCalSlidingWindow(const SInterval* pInterval, const STimeWindow* pWin, TSKEY calStart, TSKEY calEnd, EStreamType blockType);
|
2023-08-14 06:24:21 +00:00
|
|
|
bool compareVal(const char* v, const SStateKeys* pKey);
|
2023-10-16 05:53:47 +00:00
|
|
|
bool inWinRange(STimeWindow* range, STimeWindow* cur);
|
2023-04-28 03:42:34 +00:00
|
|
|
|
2023-08-14 06:24:21 +00:00
|
|
|
int32_t getNextQualifiedWindow(SInterval* pInterval, STimeWindow* pNext, SDataBlockInfo* pDataBlockInfo,
|
2023-08-18 07:27:02 +00:00
|
|
|
TSKEY* primaryKeys, int32_t prevPosition, int32_t order);
|
2024-07-29 02:35:06 +00:00
|
|
|
int32_t extractQualifiedTupleByFilterResult(SSDataBlock* pBlock, const SColumnInfoData* p, int32_t status);
|
2024-07-12 03:03:45 +00:00
|
|
|
bool getIgoreNullRes(SExprSupp* pExprSup);
|
|
|
|
|
bool checkNullRow(SExprSupp* pExprSup, SSDataBlock* pSrcBlock, int32_t index, bool ignoreNull);
|
2026-01-29 06:54:28 +00:00
|
|
|
STrueForInfo* getTrueForInfo(struct SOperatorInfo* pOperator);
|
2024-01-03 08:25:45 +00:00
|
|
|
|
2025-07-16 06:42:16 +00:00
|
|
|
void destroyTmqScanOperatorInfo(void* param);
|
2025-03-15 09:06:48 +00:00
|
|
|
int32_t checkUpdateData(SStreamScanInfo* pInfo, bool invertible, SSDataBlock* pBlock, bool out);
|
2025-07-16 06:42:16 +00:00
|
|
|
void resetBasicOperatorState(SOptrBasicInfo* pBasicInfo);
|
2025-03-15 09:06:48 +00:00
|
|
|
|
2025-09-26 09:32:32 +00:00
|
|
|
int32_t addNewResultRowBuf(SResultRow* pWindowRes, SDiskbasedBuf* pResultBuf, uint32_t size);
|
|
|
|
|
|
2021-09-24 10:05:56 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-04-28 03:42:34 +00:00
|
|
|
#endif // TDENGINE_EXECUTORINT_H
|