pitrou commented on code in PR #47466:
URL: https://github.com/apache/arrow/pull/47466#discussion_r2348055399


##########
cpp/src/parquet/statistics.cc:
##########
@@ -834,7 +844,7 @@ class TypedStatisticsImpl : public TypedStatistics<DType> {
   void SetMinMaxPair(std::pair<T, T> min_max) {
     // CleanStatistic can return a nullopt in case of erroneous values, e.g. 
NaN
     auto maybe_min_max = CleanStatistic(min_max, logical_type_);
-    if (!maybe_min_max) return;
+    if (!maybe_min_max || comparator_ == nullptr) return;

Review Comment:
   We can check `comparator_` *before* calling `CleanStatistic`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to