Skip to content

Commit

Permalink
fix cleanup handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleFU committed Jan 14, 2025
1 parent ea47172 commit 97c2298
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions cpp/src/parquet/statistics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,18 @@ optional<std::pair<FLBA, FLBA>> CleanStatistic(std::pair<FLBA, FLBA> min_max,

optional<std::pair<ByteArray, ByteArray>> CleanStatistic(
std::pair<ByteArray, ByteArray> min_max, LogicalType::Type::type) {
if (min_max.first.ptr == nullptr || min_max.second.ptr == nullptr) {
return ::std::nullopt;
static ByteArray empty("");
if (min_max.first.ptr == nullptr) {
if (min_max.first.len != 0) {
return ::std::nullopt;
}
min_max.first = empty;
}
if (min_max.second.ptr == nullptr) {
if (min_max.second.len != 0) {
return ::std::nullopt;
}
min_max.second = empty;
}
return min_max;
}
Expand Down

0 comments on commit 97c2298

Please sign in to comment.