@@ -56,6 +56,7 @@ uint64_t getRawSizeFromFixedWidthVector(
56
56
}
57
57
}
58
58
59
+ context.nulls = nullCount;
59
60
return ((ranges.size () - nullCount) * sizeof (T)) +
60
61
(nullCount * NULL_SIZE);
61
62
}
@@ -67,6 +68,7 @@ uint64_t getRawSizeFromFixedWidthVector(
67
68
encoding,
68
69
vector->typeKind ());
69
70
71
+ context.nulls = constVector->mayHaveNulls () ? ranges.size () : 0 ;
70
72
return constVector->mayHaveNulls () ? ranges.size () * NULL_SIZE
71
73
: ranges.size () * sizeof (T);
72
74
}
@@ -92,6 +94,7 @@ uint64_t getRawSizeFromFixedWidthVector(
92
94
}
93
95
}
94
96
97
+ context.nulls = nullCount;
95
98
return ((ranges.size () - nullCount) * sizeof (T)) +
96
99
(nullCount * NULL_SIZE);
97
100
}
@@ -132,6 +135,7 @@ uint64_t getRawSizeFromStringVector(
132
135
}
133
136
}
134
137
138
+ context.nulls = nullCount;
135
139
return rawSize + (nullCount * NULL_SIZE);
136
140
}
137
141
case velox::VectorEncoding::Simple::CONSTANT: {
@@ -143,6 +147,7 @@ uint64_t getRawSizeFromStringVector(
143
147
encoding,
144
148
vector->typeKind ());
145
149
150
+ context.nulls = constVector->mayHaveNulls () ? ranges.size () : 0 ;
146
151
return constVector->mayHaveNulls ()
147
152
? ranges.size () * NULL_SIZE
148
153
: ranges.size () * constVector->value ().size ();
@@ -179,6 +184,7 @@ uint64_t getRawSizeFromStringVector(
179
184
}
180
185
}
181
186
187
+ context.nulls = nullCount;
182
188
return rawSize + (nullCount * NULL_SIZE);
183
189
}
184
190
default : {
@@ -224,7 +230,7 @@ uint64_t getRawSizeFromConstantComplexVector(
224
230
} else {
225
231
rawSize = getRawSizeFromVector (valueVector, childRanges, context);
226
232
}
227
-
233
+ context. nulls = constantVector-> mayHaveNulls () ? ranges. size () : 0 ;
228
234
return rawSize * ranges.size ();
229
235
}
230
236
@@ -333,6 +339,7 @@ uint64_t getRawSizeFromArrayVector(
333
339
getRawSizeFromVector (arrayVector->elements (), childRanges, context);
334
340
}
335
341
342
+ context.nulls = nullCount;
336
343
if (nullCount) {
337
344
rawSize += nullCount * NULL_SIZE;
338
345
}
@@ -446,6 +453,7 @@ uint64_t getRawSizeFromMapVector(
446
453
getRawSizeFromVector (mapVector->mapValues (), childRanges, context);
447
454
}
448
455
456
+ context.nulls = nullCount;
449
457
if (nullCount) {
450
458
rawSize += nullCount * NULL_SIZE;
451
459
}
@@ -549,10 +557,12 @@ uint64_t getRawSizeFromRowVector(
549
557
rawSize += childRawSize;
550
558
if (topLevel) {
551
559
context.appendSize (childRawSize);
560
+ context.appendNullCount (context.nulls );
552
561
}
553
562
}
554
563
}
555
564
565
+ context.nulls = nullCount;
556
566
if (nullCount) {
557
567
rawSize += nullCount * NULL_SIZE;
558
568
}
0 commit comments