diff --git a/velox/dwio/common/tests/utils/FilterGenerator.h b/velox/dwio/common/tests/utils/FilterGenerator.h index c0fdad28fa52..174e0db0a9af 100644 --- a/velox/dwio/common/tests/utils/FilterGenerator.h +++ b/velox/dwio/common/tests/utils/FilterGenerator.h @@ -278,8 +278,8 @@ class ColumnStats : public AbstractColumnStats { return std::make_unique(0, 0, false); } } - int32_t lowerIndex; - int32_t upperIndex; + int32_t lowerIndex = 0; + int32_t upperIndex = 0; T lower = valueAtPct(filterSpec.startPct, &lowerIndex); T upper = valueAtPct(filterSpec.startPct + filterSpec.selectPct, &upperIndex); @@ -314,7 +314,7 @@ class ColumnStats : public AbstractColumnStats { std::unique_ptr makeRowGroupSkipRangeFilter( const std::vector& batches, const Subfield& subfield) { - T max; + T max = {}; bool hasMax = false; for (auto batch : batches) { auto values = getChildBySubfield(batch.get(), subfield, rootType_)