• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

taosdata / TDengine / #4808

16 Oct 2025 11:40AM UTC coverage: 57.938% (-0.6%) from 58.524%
#4808

push

travis-ci

web-flow
fix(tref): increase TSDB_REF_OBJECTS from 100 to 2000 for improved reference handling (#33281)

137662 of 303532 branches covered (45.35%)

Branch coverage included in aggregate %.

209234 of 295200 relevant lines covered (70.88%)

4035326.15 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

72.1
/source/libs/executor/src/eventwindowoperator.c
1
/*
2
 * Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
3
 *
4
 * This program is free software: you can use, redistribute, and/or modify
5
 * it under the terms of the GNU Affero General Public License, version 3
6
 * or later ("AGPL"), as published by the Free Software Foundation.
7
 *
8
 * This program is distributed in the hope that it will be useful, but WITHOUT
9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
 * FITNESS FOR A PARTICULAR PURPOSE.
11
 *
12
 * You should have received a copy of the GNU Affero General Public License
13
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14
 */
15

16
#include "executorInt.h"
17
#include "filter.h"
18
#include "function.h"
19
#include "functionMgt.h"
20
#include "operator.h"
21
#include "querytask.h"
22
#include "tcommon.h"
23
#include "tcompare.h"
24
#include "tdatablock.h"
25
#include "ttime.h"
26

27
static int32_t eventWindowAggregateNext(SOperatorInfo* pOperator, SSDataBlock** pRes);
28
static void    destroyEWindowOperatorInfo(void* param);
29
static int32_t eventWindowAggImpl(SOperatorInfo* pOperator, SEventWindowOperatorInfo* pInfo, SSDataBlock* pBlock);
30
void cleanupResultInfoInEventWindow(SOperatorInfo* pOperator, SEventWindowOperatorInfo* pInfo);
31

32
static int32_t resetEventWindowOperState(SOperatorInfo* pOper) {
×
33
  SEventWindowOperatorInfo* pEvent = pOper->info;
×
34
  SExecTaskInfo*           pTaskInfo = pOper->pTaskInfo;
×
35
  SEventWinodwPhysiNode* pPhynode = (SEventWinodwPhysiNode*)pOper->pPhyNode;
×
36
  pOper->status = OP_NOT_OPENED;
×
37

38
  resetBasicOperatorState(&pEvent->binfo);
×
39
  taosMemoryFreeClear(pEvent->pRow);
×
40

41
  pEvent->groupId = 0;
×
42
  pEvent->pPreDataBlock = NULL;
×
43
  pEvent->inWindow = false;
×
44

45
  colDataDestroy(&pEvent->twAggSup.timeWindowData);
×
46
  int32_t code = initExecTimeWindowInfo(&pEvent->twAggSup.timeWindowData, &pTaskInfo->window);
×
47
  cleanupResultInfoInEventWindow(pOper, pEvent);
×
48

49
  if (code == 0) {
×
50
    code = resetAggSup(&pOper->exprSupp, &pEvent->aggSup, pTaskInfo, pPhynode->window.pFuncs, NULL,
×
51
                       sizeof(int64_t) * 2 + POINTER_BYTES, pTaskInfo->id.str, pTaskInfo->streamInfo.pState,
×
52
                       &pTaskInfo->storageAPI.functionStore);
53
  }
54
  if (code == 0) {
×
55
    code = resetExprSupp(&pEvent->scalarSup, pTaskInfo, pPhynode->window.pExprs, NULL,
×
56
                         &pTaskInfo->storageAPI.functionStore);
57
  }
58
  return code;
×
59
}
60

61
int32_t createEventwindowOperatorInfo(SOperatorInfo* downstream, SPhysiNode* physiNode,
241✔
62
                                             SExecTaskInfo* pTaskInfo, SOperatorInfo** pOptrInfo) {
63
  QRY_PARAM_CHECK(pOptrInfo);
241!
64

65
  int32_t                   code = TSDB_CODE_SUCCESS;
241✔
66
  int32_t                   lino = 0;
241✔
67
  SEventWindowOperatorInfo* pInfo = taosMemoryCalloc(1, sizeof(SEventWindowOperatorInfo));
241!
68
  SOperatorInfo*            pOperator = taosMemoryCalloc(1, sizeof(SOperatorInfo));
242!
69
  if (pInfo == NULL || pOperator == NULL) {
242!
70
    code = terrno;
×
71
    goto _error;
×
72
  }
73

74
  pOperator->pPhyNode = physiNode;
242✔
75
  pOperator->exprSupp.hasWindowOrGroup = true;
242✔
76

77
  SEventWinodwPhysiNode* pEventWindowNode = (SEventWinodwPhysiNode*)physiNode;
242✔
78

79
  int32_t tsSlotId = ((SColumnNode*)pEventWindowNode->window.pTspk)->slotId;
242✔
80
  code = filterInitFromNode((SNode*)pEventWindowNode->pStartCond, &pInfo->pStartCondInfo, 0,
242✔
81
                            pTaskInfo->pStreamRuntimeInfo);
242✔
82
  QUERY_CHECK_CODE(code, lino, _error);
242!
83

84
  code = filterInitFromNode((SNode*)pEventWindowNode->pEndCond, &pInfo->pEndCondInfo, 0,
242✔
85
                            pTaskInfo->pStreamRuntimeInfo);
242✔
86
  QUERY_CHECK_CODE(code, lino, _error);
242!
87

88
  if (pEventWindowNode->window.pExprs != NULL) {
242✔
89
    int32_t    numOfScalarExpr = 0;
2✔
90
    SExprInfo* pScalarExprInfo = NULL;
2✔
91

92
    code = createExprInfo(pEventWindowNode->window.pExprs, NULL, &pScalarExprInfo, &numOfScalarExpr);
2✔
93
    QUERY_CHECK_CODE(code, lino, _error);
2!
94
    code = initExprSupp(&pInfo->scalarSup, pScalarExprInfo, numOfScalarExpr, &pTaskInfo->storageAPI.functionStore);
2✔
95
    QUERY_CHECK_CODE(code, lino, _error);
2!
96
  }
97

98
  code = filterInitFromNode((SNode*)pEventWindowNode->window.node.pConditions, &pOperator->exprSupp.pFilterInfo, 0,
242✔
99
                            pTaskInfo->pStreamRuntimeInfo);
242✔
100
  QUERY_CHECK_CODE(code, lino, _error);
242!
101

102
  size_t keyBufSize = sizeof(int64_t) + sizeof(int64_t) + POINTER_BYTES;
242✔
103

104
  int32_t    num = 0;
242✔
105
  SExprInfo* pExprInfo = NULL;
242✔
106
  code = createExprInfo(pEventWindowNode->window.pFuncs, NULL, &pExprInfo, &num);
242✔
107
  QUERY_CHECK_CODE(code, lino, _error);
242!
108

109
  initResultSizeInfo(&pOperator->resultInfo, 4096);
242✔
110

111
  code = initAggSup(&pOperator->exprSupp, &pInfo->aggSup, pExprInfo, num, keyBufSize, pTaskInfo->id.str,
242✔
112
                    pTaskInfo->streamInfo.pState, &pTaskInfo->storageAPI.functionStore);
242✔
113
  QUERY_CHECK_CODE(code, lino, _error);
242!
114

115
  SSDataBlock* pResBlock = createDataBlockFromDescNode(pEventWindowNode->window.node.pOutputDataBlockDesc);
242✔
116
  QUERY_CHECK_NULL(pResBlock, code, lino, _error, terrno);
242!
117
  initBasicInfo(&pInfo->binfo, pResBlock);
242✔
118

119
  code = blockDataEnsureCapacity(pResBlock, pOperator->resultInfo.capacity);
242✔
120
  QUERY_CHECK_CODE(code, lino, _error);
242!
121

122
  initResultRowInfo(&pInfo->binfo.resultRowInfo);
242✔
123
  pInfo->binfo.inputTsOrder = physiNode->inputTsOrder;
242✔
124
  pInfo->binfo.outputTsOrder = physiNode->outputTsOrder;
242✔
125

126
  pInfo->twAggSup = (STimeWindowAggSupp){.waterMark = pEventWindowNode->window.watermark,
242✔
127
                                         .calTrigger = pEventWindowNode->window.triggerType};
242✔
128

129
  code = initExecTimeWindowInfo(&pInfo->twAggSup.timeWindowData, &pTaskInfo->window);
242✔
130
  QUERY_CHECK_CODE(code, lino, _error);
242!
131

132
  pInfo->tsSlotId = tsSlotId;
242✔
133
  pInfo->pPreDataBlock = NULL;
242✔
134
  pInfo->pOperator = pOperator;
242✔
135
  pInfo->trueForLimit = pEventWindowNode->trueForLimit;
242✔
136

137
  setOperatorInfo(pOperator, "EventWindowOperator", QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT, true, OP_NOT_OPENED, pInfo,
242✔
138
                  pTaskInfo);
139
  pOperator->fpSet = createOperatorFpSet(optrDummyOpenFn, eventWindowAggregateNext, NULL, destroyEWindowOperatorInfo,
242✔
140
                                         optrDefaultBufFn, NULL, optrDefaultGetNextExtFn, NULL);
141

142
  setOperatorResetStateFn(pOperator, resetEventWindowOperState);
242✔
143
  code = appendDownstream(pOperator, &downstream, 1);
242✔
144
  if (code != TSDB_CODE_SUCCESS) {
242!
145
    goto _error;
×
146
  }
147

148
  *pOptrInfo = pOperator;
242✔
149
  return TSDB_CODE_SUCCESS;
242✔
150

151
_error:
×
152
  if (pInfo != NULL) {
×
153
    destroyEWindowOperatorInfo(pInfo);
×
154
  }
155

156
  destroyOperatorAndDownstreams(pOperator, &downstream, 1);
×
157
  pTaskInfo->code = code;
×
158
  return code;
×
159
}
160

161
void cleanupResultInfoInEventWindow(SOperatorInfo* pOperator, SEventWindowOperatorInfo* pInfo) {
242✔
162
  if (pInfo == NULL || pInfo->pRow == NULL || pOperator == NULL) {
242!
163
    return;
42✔
164
  }
165
  SExprSupp*       pSup = &pOperator->exprSupp;
200✔
166
  for (int32_t j = 0; j < pSup->numOfExprs; ++j) {
1,855✔
167
    pSup->pCtx[j].resultInfo = getResultEntryInfo(pInfo->pRow, j, pSup->rowEntryInfoOffset);
1,655✔
168
    if (pSup->pCtx[j].fpSet.cleanup) {
1,655!
169
      pSup->pCtx[j].fpSet.cleanup(&pSup->pCtx[j]);
×
170
    }
171
  }
172
}
173

174
void destroyEWindowOperatorInfo(void* param) {
242✔
175
  SEventWindowOperatorInfo* pInfo = (SEventWindowOperatorInfo*)param;
242✔
176
  if (pInfo == NULL) {
242!
177
    return;
×
178
  }
179

180
  if (pInfo->pRow != NULL) {
242✔
181
    taosMemoryFree(pInfo->pRow);
200!
182
  }
183

184
  if (pInfo->pStartCondInfo != NULL) {
242!
185
    filterFreeInfo(pInfo->pStartCondInfo);
242✔
186
    pInfo->pStartCondInfo = NULL;
242✔
187
  }
188

189
  if (pInfo->pEndCondInfo != NULL) {
242!
190
    filterFreeInfo(pInfo->pEndCondInfo);
242✔
191
    pInfo->pEndCondInfo = NULL;
242✔
192
  }
193

194
  cleanupBasicInfo(&pInfo->binfo);
242✔
195
  colDataDestroy(&pInfo->twAggSup.timeWindowData);
242✔
196

197
  cleanupResultInfoInEventWindow(pInfo->pOperator, pInfo);
242✔
198
  pInfo->pOperator = NULL;
242✔
199
  cleanupAggSup(&pInfo->aggSup);
242✔
200
  cleanupExprSupp(&pInfo->scalarSup);
242✔
201
  taosMemoryFreeClear(param);
242!
202
}
203

204
static int32_t eventWindowAggregateNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) {
2,334✔
205
  int32_t                   code = TSDB_CODE_SUCCESS;
2,334✔
206
  int32_t                   lino = 0;
2,334✔
207
  SEventWindowOperatorInfo* pInfo = pOperator->info;
2,334✔
208
  SExecTaskInfo*            pTaskInfo = pOperator->pTaskInfo;
2,334✔
209

210
  SExprSupp* pSup = &pOperator->exprSupp;
2,334✔
211
  int32_t    order = pInfo->binfo.inputTsOrder;
2,334✔
212

213
  SSDataBlock* pRes = pInfo->binfo.pRes;
2,334✔
214

215
  blockDataCleanup(pRes);
2,334✔
216

217
  SOperatorInfo* downstream = pOperator->pDownstream[0];
2,333✔
218
  while (1) {
5,405✔
219
    SSDataBlock* pBlock = NULL;
7,738✔
220
    if (pInfo->pPreDataBlock == NULL) {
7,738✔
221
      pBlock = getNextBlockFromDownstream(pOperator, 0);
5,281✔
222
    } else {
223
      pBlock = pInfo->pPreDataBlock;
2,457✔
224
      pInfo->pPreDataBlock = NULL;
2,457✔
225
    }
226

227
    if (pBlock == NULL) {
7,739✔
228
      break;
244✔
229
    }
230

231
    pRes->info.scanFlag = pBlock->info.scanFlag;
7,495✔
232
    code = setInputDataBlock(pSup, pBlock, order, MAIN_SCAN, true);
7,495✔
233
    QUERY_CHECK_CODE(code, lino, _end);
7,495!
234

235
    code = blockDataUpdateTsWindow(pBlock, pInfo->tsSlotId);
7,495✔
236
    QUERY_CHECK_CODE(code, lino, _end);
7,495!
237

238
    // there is an scalar expression that needs to be calculated right before apply the group aggregation.
239
    if (pInfo->scalarSup.pExprInfo != NULL) {
7,495✔
240
      code = projectApplyFunctions(pInfo->scalarSup.pExprInfo, pBlock, pBlock, pInfo->scalarSup.pCtx,
4✔
241
                                   pInfo->scalarSup.numOfExprs, NULL, GET_STM_RTINFO(pOperator->pTaskInfo));
4!
242
      QUERY_CHECK_CODE(code, lino, _end);
4!
243
    }
244

245
    code = eventWindowAggImpl(pOperator, pInfo, pBlock);
7,495✔
246
    QUERY_CHECK_CODE(code, lino, _end);
7,495!
247

248
    code = doFilter(pRes, pSup->pFilterInfo, NULL, NULL);
7,495✔
249
    QUERY_CHECK_CODE(code, lino, _end);
7,495!
250

251
    if (pRes->info.rows >= pOperator->resultInfo.threshold ||
7,495✔
252
        (pRes->info.id.groupId != pInfo->groupId && pRes->info.rows > 0)) {
7,467✔
253
      (*ppRes) = pRes;
2,090✔
254
      return code;
2,090✔
255
    }
256
  }
257

258
_end:
244✔
259
  if (code != TSDB_CODE_SUCCESS) {
244!
260
    qError("%s failed at line %d since %s", __func__, lino, tstrerror(code));
×
261
    pTaskInfo->code = code;
×
262
    T_LONG_JMP(pTaskInfo->env, code);
×
263
  }
264
  (*ppRes) =  pRes->info.rows == 0 ? NULL : pRes;
244✔
265
  return code;
244✔
266
}
267

268
static int32_t setSingleOutputTupleBufv1(SResultRowInfo* pResultRowInfo, STimeWindow* win, SResultRow** pResult,
207,290✔
269
                                         SExprSupp* pExprSup, SAggSupporter* pAggSup) {
270
  if (*pResult == NULL) {
207,290✔
271
    SResultRow* p = taosMemoryCalloc(1, pAggSup->resultRowSize);
200!
272
    if (!p) {
200!
273
      return terrno;
×
274
    }
275
    pResultRowInfo->cur = (SResultRowPosition){.pageId = p->pageId, .offset = p->offset};
200✔
276
    *pResult = p;
200✔
277
  }
278

279
  (*pResult)->win = *win;
207,290✔
280

281
  return setResultRowInitCtx(*pResult, pExprSup->pCtx, pExprSup->numOfExprs, pExprSup->rowEntryInfoOffset);
207,290✔
282
}
283

284
static int32_t doEventWindowAggImpl(SEventWindowOperatorInfo* pInfo, SExprSupp* pSup, int32_t startIndex,
207,290✔
285
                                    int32_t endIndex, const SSDataBlock* pBlock, int64_t* tsList,
286
                                    SExecTaskInfo* pTaskInfo) {
287
  int32_t code = TSDB_CODE_SUCCESS;
207,290✔
288
  SWindowRowsSup* pRowSup = &pInfo->winSup;
207,290✔
289

290
  int32_t numOfOutput = pSup->numOfExprs;
207,290✔
291
  int32_t numOfRows = endIndex - startIndex + 1;
207,290✔
292

293
  doKeepTuple(pRowSup, tsList[endIndex], endIndex, pBlock->info.id.groupId);
207,290✔
294

295
  code = setSingleOutputTupleBufv1(&pInfo->binfo.resultRowInfo, &pRowSup->win, &pInfo->pRow, pSup, &pInfo->aggSup);
207,290✔
296
  if (code != TSDB_CODE_SUCCESS) {  // null data, too many state code
207,290!
297
    qError("failed to set single output tuple buffer, code:%d", code);
×
298
    return code;
×
299
  }
300

301
  updateTimeWindowInfo(&pInfo->twAggSup.timeWindowData, &pRowSup->win, 0);
207,290✔
302
  code = applyAggFunctionOnPartialTuples(pTaskInfo, pSup->pCtx, &pInfo->twAggSup.timeWindowData, startIndex, numOfRows,
207,290✔
303
                                         pBlock->info.rows, numOfOutput);
207,290✔
304
  return code;
207,290✔
305
}
306

307
int32_t eventWindowAggImpl(SOperatorInfo* pOperator, SEventWindowOperatorInfo* pInfo, SSDataBlock* pBlock) {
7,495✔
308
  int32_t          code = TSDB_CODE_SUCCESS;
7,495✔
309
  int32_t          lino = 0;
7,495✔
310
  SExecTaskInfo*   pTaskInfo = pOperator->pTaskInfo;
7,495✔
311
  SExprSupp*       pSup = &pOperator->exprSupp;
7,495✔
312
  SSDataBlock*     pRes = pInfo->binfo.pRes;
7,495✔
313
  int64_t          gid = pBlock->info.id.groupId;
7,495✔
314
  SColumnInfoData *ps = NULL, *pe = NULL;
7,495✔
315
  SColumnInfoData* pColInfoData = taosArrayGet(pBlock->pDataBlock, pInfo->tsSlotId);
7,495✔
316
  QUERY_CHECK_NULL(pColInfoData, code, lino, _return, terrno);
7,495!
317
  TSKEY*           tsList = (TSKEY*)pColInfoData->pData;
7,495✔
318
  SWindowRowsSup*  pRowSup = &pInfo->winSup;
7,495✔
319
  int32_t          rowIndex = 0;
7,495✔
320
  int64_t          minWindowSize = getMinWindowSize(pOperator);
7,495✔
321

322
  pRowSup->numOfRows = 0;
7,495✔
323
  if (pInfo->groupId == 0) {
7,495✔
324
    pInfo->groupId = gid;
1,509✔
325
  } else if (pInfo->groupId != gid) {
5,986✔
326
    // this is a new group, reset the info
327
    pInfo->inWindow = false;
2,489✔
328
    pInfo->groupId = gid;
2,489✔
329
    pInfo->pPreDataBlock = pBlock;
2,489✔
330
    goto _return;
2,489✔
331
  }
332
  pRes->info.id.groupId = pInfo->groupId;
5,006✔
333

334
  SFilterColumnParam param1 = {.numOfCols = taosArrayGetSize(pBlock->pDataBlock), .pDataBlock = pBlock->pDataBlock};
5,006✔
335

336
  code = filterSetDataFromSlotId(pInfo->pStartCondInfo, &param1);
5,006✔
337
  QUERY_CHECK_CODE(code, lino, _return);
5,006!
338

339
  int32_t status1 = 0;
5,006✔
340
  code = filterExecute(pInfo->pStartCondInfo, pBlock, &ps, NULL, param1.numOfCols, &status1);
5,006✔
341
  QUERY_CHECK_CODE(code, lino, _return);
5,006!
342

343
  SFilterColumnParam param2 = {.numOfCols = taosArrayGetSize(pBlock->pDataBlock), .pDataBlock = pBlock->pDataBlock};
5,006✔
344
  code = filterSetDataFromSlotId(pInfo->pEndCondInfo, &param2);
5,006✔
345
  QUERY_CHECK_CODE(code, lino, _return);
5,006!
346

347
  int32_t status2 = 0;
5,006✔
348
  code = filterExecute(pInfo->pEndCondInfo, pBlock, &pe, NULL, param2.numOfCols, &status2);
5,006✔
349
  QUERY_CHECK_CODE(code, lino, _return);
5,006!
350

351
  int32_t startIndex = pInfo->inWindow ? 0 : -1;
5,006✔
352
  while (rowIndex < pBlock->info.rows) {
418,279✔
353
    if (pInfo->inWindow) {  // let's find the first end value
415,083✔
354
      for (rowIndex = startIndex; rowIndex < pBlock->info.rows; ++rowIndex) {
1,343,227✔
355
        if (((bool*)pe->pData)[rowIndex]) {
1,340,390✔
356
          break;
204,453✔
357
        }
358
      }
359

360
      if (rowIndex < pBlock->info.rows) {
207,290✔
361
        code = doEventWindowAggImpl(pInfo, pSup, startIndex, rowIndex, pBlock, tsList, pTaskInfo);
204,453✔
362
        QUERY_CHECK_CODE(code, lino, _return);
204,453!
363
        doUpdateNumOfRows(pSup->pCtx, pInfo->pRow, pSup->numOfExprs, pSup->rowEntryInfoOffset);
204,453✔
364

365
        if (pRowSup->win.ekey - pRowSup->win.skey < minWindowSize) {
204,453✔
366
          qDebug("skip small window, groupId: %" PRId64 ", windowSize: %" PRId64 ", minWindowSize: %" PRId64,
868!
367
                 pInfo->groupId, pRowSup->win.ekey - pRowSup->win.skey, minWindowSize);
368
        } else {
369
          // check buffer size
370
          if (pRes->info.rows + pInfo->pRow->numOfRows >= pRes->info.capacity) {
203,585!
371
            int32_t newSize = pRes->info.rows + pInfo->pRow->numOfRows;
×
372
            code = blockDataEnsureCapacity(pRes, newSize);
×
373
            QUERY_CHECK_CODE(code, lino, _return);
×
374
          }
375

376
          code = copyResultrowToDataBlock(pSup->pExprInfo, pSup->numOfExprs, pInfo->pRow, pSup->pCtx, pRes,
203,585✔
377
                                          pSup->rowEntryInfoOffset, pTaskInfo);
203,585✔
378
          QUERY_CHECK_CODE(code, lino, _return);
203,585!
379

380
          pRes->info.rows += pInfo->pRow->numOfRows;
203,585✔
381
        }
382
        pInfo->pRow->numOfRows = 0;
204,453✔
383

384
        pInfo->inWindow = false;
204,453✔
385
        rowIndex += 1;
204,453✔
386
      } else {
387
        code = doEventWindowAggImpl(pInfo, pSup, startIndex, pBlock->info.rows - 1, pBlock, tsList, pTaskInfo);
2,837✔
388
        QUERY_CHECK_CODE(code, lino, _return);
2,837!
389
      }
390
    } else {  // find the first start value that is fulfill for the start condition
391
      for (; rowIndex < pBlock->info.rows; ++rowIndex) {
833,515✔
392
        if (((bool*)ps->pData)[rowIndex]) {
831,705✔
393
          doKeepNewWindowStartInfo(pRowSup, tsList, rowIndex, gid);
205,983✔
394
          pInfo->inWindow = true;
205,983✔
395
          startIndex = rowIndex;
205,983✔
396
          if (pInfo->pRow != NULL) {
205,983✔
397
            clearResultRowInitFlag(pSup->pCtx, pSup->numOfExprs);
205,783✔
398
          }
399
          break;
205,983✔
400
        }
401
      }
402

403
      if (pInfo->inWindow) {
207,793✔
404
        continue;  // try to find the end position
205,983✔
405
      } else {
406
        break;  // no valid start position, quit
1,810✔
407
      }
408
    }
409
  }
410

411
_return:
3,196✔
412

413
  if (code != TSDB_CODE_SUCCESS) {
7,495!
414
    qError("%s failed at line %d since %s", __func__, lino, tstrerror(code));
×
415
  }
416
  colDataDestroy(ps);
7,495✔
417
  taosMemoryFree(ps);
7,495!
418
  colDataDestroy(pe);
7,495✔
419
  taosMemoryFree(pe);
7,495!
420

421
  return code;
7,495✔
422
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc