提交 647ddaad 编写于 作者: G Ganlin Zhao

fix: fix order by ts desc error

上级 500493b1
......@@ -2857,7 +2857,7 @@ static int32_t buildComposedDataBlock(STsdbReader* pReader) {
// it is a clean block, load it directly
if (isCleanFileDataBlock(pReader, pBlockInfo, pBlock, pBlockScanInfo, keyInBuf, pLastBlockReader) &&
pBlock->nRow <= pReader->resBlockInfo.capacity) {
if (asc || (!hasDataInLastBlock(pLastBlockReader))) {
if (asc || (!hasDataInLastBlock(pLastBlockReader) && (!asc && (pBlock->maxKey.ts > keyInBuf.ts)))) {
code = copyBlockDataToSDataBlock(pReader);
if (code) {
goto _end;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册