fix: fix order by ts desc error
This commit is contained in:
parent
500493b157
commit
647ddaad97
|
@ -2857,7 +2857,7 @@ static int32_t buildComposedDataBlock(STsdbReader* pReader) {
|
||||||
// it is a clean block, load it directly
|
// it is a clean block, load it directly
|
||||||
if (isCleanFileDataBlock(pReader, pBlockInfo, pBlock, pBlockScanInfo, keyInBuf, pLastBlockReader) &&
|
if (isCleanFileDataBlock(pReader, pBlockInfo, pBlock, pBlockScanInfo, keyInBuf, pLastBlockReader) &&
|
||||||
pBlock->nRow <= pReader->resBlockInfo.capacity) {
|
pBlock->nRow <= pReader->resBlockInfo.capacity) {
|
||||||
if (asc || (!hasDataInLastBlock(pLastBlockReader))) {
|
if (asc || (!hasDataInLastBlock(pLastBlockReader) && (!asc && (pBlock->maxKey.ts > keyInBuf.ts)))) {
|
||||||
code = copyBlockDataToSDataBlock(pReader);
|
code = copyBlockDataToSDataBlock(pReader);
|
||||||
if (code) {
|
if (code) {
|
||||||
goto _end;
|
goto _end;
|
||||||
|
|
Loading…
Reference in New Issue