more code
This commit is contained in:
parent
d4aa79e631
commit
95340540a2
|
@ -196,13 +196,29 @@ static int32_t tRowBuildScan(SArray *colVals, const STSchema *schema, SRowBuildS
|
||||||
|
|
||||||
// Tuple
|
// Tuple
|
||||||
sinfo->tupleFlag = sinfo->flag;
|
sinfo->tupleFlag = sinfo->flag;
|
||||||
if (sinfo->flag == HAS_NONE || sinfo->flag == HAS_NULL) {
|
switch (sinfo->flag) {
|
||||||
sinfo->tupleRowSize = sizeof(SRow);
|
case HAS_NONE:
|
||||||
} else {
|
case HAS_NULL:
|
||||||
if (sinfo->flag == (HAS_NONE | HAS_NULL | HAS_VALUE)) {
|
sinfo->tupleBitmapSize = 0;
|
||||||
sinfo->tupleBitmapSize = BIT2_SIZE(schema->numOfCols - 1);
|
sinfo->tupleFixedSize = 0;
|
||||||
} else if (sinfo->flag != HAS_VALUE) {
|
break;
|
||||||
|
case HAS_VALUE:
|
||||||
|
sinfo->tupleBitmapSize = 0;
|
||||||
|
sinfo->tupleFixedSize = schema->flen;
|
||||||
|
break;
|
||||||
|
case (HAS_NONE | HAS_NULL):
|
||||||
sinfo->tupleBitmapSize = BIT1_SIZE(schema->numOfCols - 1);
|
sinfo->tupleBitmapSize = BIT1_SIZE(schema->numOfCols - 1);
|
||||||
|
sinfo->tupleFixedSize = 0;
|
||||||
|
break;
|
||||||
|
case (HAS_NONE | HAS_VALUE):
|
||||||
|
case (HAS_NULL | HAS_VALUE):
|
||||||
|
sinfo->tupleBitmapSize = BIT1_SIZE(schema->numOfCols - 1);
|
||||||
|
sinfo->tupleFixedSize = schema->flen;
|
||||||
|
break;
|
||||||
|
case (HAS_NONE | HAS_NULL | HAS_VALUE):
|
||||||
|
sinfo->tupleBitmapSize = BIT2_SIZE(schema->numOfCols - 1);
|
||||||
|
sinfo->tupleFixedSize = schema->flen;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
for (int32_t i = 0; i < sinfo->numOfPKs; i++) {
|
for (int32_t i = 0; i < sinfo->numOfPKs; i++) {
|
||||||
sinfo->tupleIndices[i].offset += sinfo->tupleBitmapSize;
|
sinfo->tupleIndices[i].offset += sinfo->tupleBitmapSize;
|
||||||
|
@ -213,7 +229,6 @@ static int32_t tRowBuildScan(SArray *colVals, const STSchema *schema, SRowBuildS
|
||||||
+ sinfo->tupleBitmapSize // bitmap
|
+ sinfo->tupleBitmapSize // bitmap
|
||||||
+ sinfo->tupleFixedSize // fixed part
|
+ sinfo->tupleFixedSize // fixed part
|
||||||
+ sinfo->tupleVarSize; // var part
|
+ sinfo->tupleVarSize; // var part
|
||||||
}
|
|
||||||
|
|
||||||
// Key-Value
|
// Key-Value
|
||||||
if (sinfo->kvMaxOffset <= UINT8_MAX) {
|
if (sinfo->kvMaxOffset <= UINT8_MAX) {
|
||||||
|
|
Loading…
Reference in New Issue