pitrou commented on code in PR #46940:
URL: https://github.com/apache/arrow/pull/46940#discussion_r2174723460
##########
cpp/src/parquet/arrow/reader_internal.cc:
##########
@@ -344,7 +344,7 @@ void AttachStatistics(::arrow::ArrayData* data,
using ArrowCType = typename ArrowType::c_type;
- auto statistics = metadata->statistics().get();
+ auto statistics = metadata->statistics();
Review Comment:
These changes are necessary or they are just cleanups?
##########
cpp/src/parquet/arrow/reader_internal.cc:
##########
@@ -358,17 +358,17 @@ void AttachStatistics(::arrow::ArrayData* data,
array_statistics->distinct_count = statistics->distinct_count();
}
if (statistics->HasMinMax()) {
- auto typed_statistics =
- static_cast<::parquet::TypedStatistics<ParquetType>*>(statistics);
+ const auto* typed_statistics =
+ checked_cast<const
::parquet::TypedStatistics<ParquetType>*>(statistics.get());
Review Comment:
+1
##########
cpp/src/parquet/statistics.cc:
##########
@@ -610,12 +610,11 @@ class TypedStatisticsImpl : public TypedStatistics<DType>
{
has_distinct_count_ = false;
}
- if (!encoded_min.empty()) {
+ if (has_min_max) {
Review Comment:
Ok, the change seems reasonable to me.
--
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]