fix: fix error during emptyTsRange.sim
This commit is contained in:
parent
61b0635293
commit
469b2b573c
|
@ -3546,7 +3546,7 @@ bool fltSclLessPoint(SFltSclPoint *pt1, SFltSclPoint *pt2) {
|
||||||
if (pt1->start && pt2->start) {
|
if (pt1->start && pt2->start) {
|
||||||
return !pt1->excl && pt2->excl;
|
return !pt1->excl && pt2->excl;
|
||||||
} else if (pt1->start) {
|
} else if (pt1->start) {
|
||||||
return pt1->excl && !pt2->excl;
|
return !pt1->excl && !pt2->excl;
|
||||||
} else if (pt2->start) {
|
} else if (pt2->start) {
|
||||||
return pt1->excl || pt2->excl;
|
return pt1->excl || pt2->excl;
|
||||||
}
|
}
|
||||||
|
@ -3971,7 +3971,7 @@ static int32_t fltSclGetDatumValueFromPoint(SFltSclPoint *point, SFltSclDatum *d
|
||||||
getDataMin(d->type.type, &(d->i));
|
getDataMin(d->type.type, &(d->i));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((point->val.kind == FLT_SCL_DATUM_KIND_INT64) || (point->val.kind = FLT_SCL_DATUM_KIND_UINT64)) {
|
if (IS_NUMERIC_TYPE(d->type.type)) {
|
||||||
if (point->excl) {
|
if (point->excl) {
|
||||||
if (point->start) {
|
if (point->start) {
|
||||||
++d->i;
|
++d->i;
|
||||||
|
@ -3980,7 +3980,7 @@ static int32_t fltSclGetDatumValueFromPoint(SFltSclPoint *point, SFltSclDatum *d
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qError("not supported kind %d when get datum from point", point->val.kind);
|
qError("not supported type %d when get datum from point", d->type.type);
|
||||||
}
|
}
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -4001,14 +4001,17 @@ int32_t filterGetTimeRange(SNode *pNode, STimeWindow *win, bool *isStrict) {
|
||||||
if (taosArrayGetSize(points) == 2) {
|
if (taosArrayGetSize(points) == 2) {
|
||||||
SFltSclPoint *startPt = taosArrayGet(points, 0);
|
SFltSclPoint *startPt = taosArrayGet(points, 0);
|
||||||
SFltSclPoint *endPt = taosArrayGet(points, 1);
|
SFltSclPoint *endPt = taosArrayGet(points, 1);
|
||||||
SFltSclDatum start;
|
SFltSclDatum start;
|
||||||
SFltSclDatum end;
|
SFltSclDatum end;
|
||||||
fltSclGetDatumValueFromPoint(startPt, &start);
|
fltSclGetDatumValueFromPoint(startPt, &start);
|
||||||
fltSclGetDatumValueFromPoint(endPt, &end);
|
fltSclGetDatumValueFromPoint(endPt, &end);
|
||||||
win->skey = start.i;
|
win->skey = start.i;
|
||||||
win->ekey = end.i;
|
win->ekey = end.i;
|
||||||
*isStrict = true;
|
*isStrict = true;
|
||||||
goto _return;
|
goto _return;
|
||||||
|
} else if (taosArrayGetSize(points) == 0) {
|
||||||
|
*win = TSWINDOW_DESC_INITIALIZER;
|
||||||
|
goto _return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*win = TSWINDOW_INITIALIZER;
|
*win = TSWINDOW_INITIALIZER;
|
||||||
|
|
Loading…
Reference in New Issue