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


##########
cpp/src/parquet/statistics.cc:
##########
@@ -336,6 +336,11 @@ CleanStatistic(std::pair<T, T> min_max, 
LogicalType::Type::type) {
   return min_max;
 }
 
+optional<std::pair<Int96, Int96>> CleanStatistic(std::pair<Int96, Int96> 
min_max,

Review Comment:
   ```suggestion
   std::optional<std::pair<Int96, Int96>> CleanStatistic(std::pair<Int96, 
Int96> min_max,
   ```



##########
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);

Review Comment:
   When will it throw?



##########
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:
   nit: add an error log?



-- 
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