fix: fix result of first can be 0 occasionally
This commit is contained in:
parent
98fbf1abb4
commit
56a715b5d5
|
@ -2415,6 +2415,10 @@ int32_t lastFunction(SqlFunctionCtx* pCtx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t firstLastTransferInfoImpl(SFirstLastRes* pInput, SFirstLastRes* pOutput, bool isFirst) {
|
static int32_t firstLastTransferInfoImpl(SFirstLastRes* pInput, SFirstLastRes* pOutput, bool isFirst) {
|
||||||
|
if (!pInput->hasResult) {
|
||||||
|
return TSDB_CODE_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
if (pOutput->hasResult) {
|
if (pOutput->hasResult) {
|
||||||
if (isFirst) {
|
if (isFirst) {
|
||||||
if (pInput->ts > pOutput->ts) {
|
if (pInput->ts > pOutput->ts) {
|
||||||
|
|
Loading…
Reference in New Issue