fix: use int32_t when sort merge datablock

This commit is contained in:
Cary Xu 2022-08-08 20:56:57 +08:00
parent 4d670b5fb9
commit 20fefa6bfd
1 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// clang-format off // clang-format on
#include "parInsertData.h" #include "parInsertData.h"
#include "catalog.h" #include "catalog.h"
@ -525,7 +525,7 @@ static int sortMergeDataBlockDupRows(STableDataBlocks* dataBuf, SBlockKeyInfo* p
SBlockRowMerger** ppBlkRowMerger) { SBlockRowMerger** ppBlkRowMerger) {
SSubmitBlk* pBlocks = (SSubmitBlk*)dataBuf->pData; SSubmitBlk* pBlocks = (SSubmitBlk*)dataBuf->pData;
STableMeta* pTableMeta = dataBuf->pTableMeta; STableMeta* pTableMeta = dataBuf->pTableMeta;
int16_t nRows = pBlocks->numOfRows; int32_t nRows = pBlocks->numOfRows;
// size is less than the total size, since duplicated rows may be removed. // size is less than the total size, since duplicated rows may be removed.
@ -546,7 +546,7 @@ static int sortMergeDataBlockDupRows(STableDataBlocks* dataBuf, SBlockKeyInfo* p
int32_t extendedRowSize = getExtendedRowSize(dataBuf); int32_t extendedRowSize = getExtendedRowSize(dataBuf);
SBlockKeyTuple* pBlkKeyTuple = pBlkKeyInfo->pKeyTuple; SBlockKeyTuple* pBlkKeyTuple = pBlkKeyInfo->pKeyTuple;
char* pBlockData = pBlocks->data + pBlocks->schemaLen; char* pBlockData = pBlocks->data + pBlocks->schemaLen;
int n = 0; int32_t n = 0;
while (n < nRows) { while (n < nRows) {
pBlkKeyTuple->skey = TD_ROW_KEY((STSRow*)pBlockData); pBlkKeyTuple->skey = TD_ROW_KEY((STSRow*)pBlockData);
pBlkKeyTuple->payloadAddr = pBlockData; pBlkKeyTuple->payloadAddr = pBlockData;