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


##########
cpp/src/parquet/statistics.cc:
##########
@@ -573,7 +578,11 @@ class TypedStatisticsImpl : public TypedStatistics<DType> {
         min_buffer_(AllocateBuffer(pool_, 0)),
         max_buffer_(AllocateBuffer(pool_, 0)),
         logical_type_(LogicalTypeId(descr_)) {
-    comparator_ = MakeComparator<DType>(descr);
+    try {
+      comparator_ = MakeComparator<DType>(descr);
+    } catch (const ParquetException&) {
+      comparator_ = nullptr;

Review Comment:
   I am unsure we want to add an error log as, yes, it is an error building the 
comparator, because SortOrder is UNKNOWN and we can't build a comparator but it 
will be a valid use case of generating statistics (we will just not set 
min/max) so I don't think we want to add an error log. What do you think?
   See the `DoMakeComparator` function:
   
https://github.com/apache/arrow/blob/d2dace9e46c278e7da5f9bfe9d07a58e6d0d2326/cpp/src/parquet/statistics.cc#L950-L998



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to