fix another bug

This commit is contained in:
Hongze Cheng 2024-03-07 16:58:26 +08:00
parent 7ffcb60f02
commit d4aa79e631
1 changed files with 17 additions and 14 deletions

View File

@ -196,11 +196,12 @@ static int32_t tRowBuildScan(SArray *colVals, const STSchema *schema, SRowBuildS
// Tuple
sinfo->tupleFlag = sinfo->flag;
if (sinfo->flag == HAS_NONE || sinfo->flag == HAS_NULL || sinfo->flag == HAS_VALUE) {
sinfo->tupleBitmapSize = 0;
} else if (sinfo->flag == (HAS_NONE | HAS_NULL | HAS_VALUE)) {
sinfo->tupleBitmapSize = BIT2_SIZE(schema->numOfCols - 1);
if (sinfo->flag == HAS_NONE || sinfo->flag == HAS_NULL) {
sinfo->tupleRowSize = sizeof(SRow);
} else {
if (sinfo->flag == (HAS_NONE | HAS_NULL | HAS_VALUE)) {
sinfo->tupleBitmapSize = BIT2_SIZE(schema->numOfCols - 1);
} else if (sinfo->flag != HAS_VALUE) {
sinfo->tupleBitmapSize = BIT1_SIZE(schema->numOfCols - 1);
}
for (int32_t i = 0; i < sinfo->numOfPKs; i++) {
@ -212,6 +213,7 @@ static int32_t tRowBuildScan(SArray *colVals, const STSchema *schema, SRowBuildS
+ sinfo->tupleBitmapSize // bitmap
+ sinfo->tupleFixedSize // fixed part
+ sinfo->tupleVarSize; // var part
}
// Key-Value
if (sinfo->kvMaxOffset <= UINT8_MAX) {
@ -251,6 +253,7 @@ static int32_t tRowBuildTupleRow(SArray *aColVal, const SRowBuildScanInfo *sinfo
(*ppRow)->ts = colValArray[0].value.val;
if (sinfo->tupleFlag == HAS_NONE || sinfo->tupleFlag == HAS_NULL) {
ASSERT(sinfo->tupleRowSize == sizeof(SRow));
return 0;
}