Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rui-mo committed Mar 10, 2025
1 parent 12e2a49 commit f61dc1f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions velox/dwio/dwrf/reader/SelectiveDecimalColumnReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,13 @@ void SelectiveDecimalColumnReader<DataT>::read(
const uint64_t* incomingNulls) {
VELOX_CHECK(!scanSpec_->valueHook());
prepareRead<int64_t>(offset, rows, incomingNulls);
if (!resultNulls_ || !resultNulls_->unique() ||
resultNulls_->capacity() * 8 < rows.size()) {
// Make sure a dedicated resultNulls_ is allocated with enough capacity as
// RleDecoder always assumes it is available.
resultNulls_ = AlignedBuffer::allocate<bool>(rows.size(), memoryPool_);
rawResultNulls_ = resultNulls_->asMutable<uint64_t>();
}
bool isDense = rows.back() == rows.size() - 1;
if (isDense) {
readHelper<true>(scanSpec_->filter(), rows);
Expand Down

0 comments on commit f61dc1f

Please sign in to comment.