wgtmac commented on code in PR #43977:
URL: https://github.com/apache/arrow/pull/43977#discussion_r1767109486
##########
cpp/src/parquet/statistics.h:
##########
@@ -372,11 +445,14 @@ template <typename DType>
std::shared_ptr<TypedStatistics<DType>> MakeStatistics(
const ColumnDescriptor* descr, const std::string& encoded_min,
const std::string& encoded_max, int64_t num_values, int64_t null_count,
- int64_t distinct_count, bool has_min_max, bool has_null_count,
- bool has_distinct_count, ::arrow::MemoryPool* pool =
::arrow::default_memory_pool()) {
- return std::static_pointer_cast<TypedStatistics<DType>>(Statistics::Make(
- descr, encoded_min, encoded_max, num_values, null_count, distinct_count,
- has_min_max, has_null_count, has_distinct_count, pool));
+ int64_t distinct_count, const EncodedGeometryStatistics&
geometry_statistics,
Review Comment:
IMO, we'd better not to add another overload. If there is a compelling
reason to do so, we can add a `ARROW_DEPRECATED` macro to the old one.
##########
cpp/src/parquet/column_reader.cc:
##########
@@ -244,8 +244,11 @@ EncodedStatistics ExtractStatsFromHeader(const H& header) {
page_statistics.set_distinct_count(stats.distinct_count);
}
if (stats.__isset.geometry_stats) {
- page_statistics.set_geometry(
- FromThrift(stats.geometry_stats, stats.__isset.geometry_stats));
+ EncodedGeometryStatistics encoded_geometry_stats;
+ if (stats.__isset.geometry_stats) {
+ encoded_geometry_stats = FromThrift(stats.geometry_stats);
+ }
+ page_statistics.set_geometry(encoded_geometry_stats);
Review Comment:
```suggestion
page_statistics.set_geometry(FromThrift(stats.geometry_stats));
```
--
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]