You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "wgtmac (via GitHub)" <gi...@apache.org> on 2023/07/22 05:47:35 UTC

[GitHub] [arrow] wgtmac commented on a diff in pull request #36814: PARQUET-2327: get min/max column statistics by isset flag

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


##########
cpp/src/parquet/metadata.cc:
##########
@@ -87,8 +87,8 @@ std::string ParquetVersionToString(ParquetVersion::type ver) {
 template <typename DType>
 static std::shared_ptr<Statistics> MakeTypedColumnStats(
     const format::ColumnMetaData& metadata, const ColumnDescriptor* descr) {
-  // If ColumnOrder is defined, return max_value and min_value
-  if (descr->column_order().get_order() == ColumnOrder::TYPE_DEFINED_ORDER) {
+  // Return max_value and min_value if defined
+  if (metadata.statistics.__isset.max_value || metadata.statistics.__isset.min_value) {

Review Comment:
   I don't think `ColumnOrder` checking can be removed here. If a writer does not set ColumnOrder but writes both min/max and min_value/max_value, we should still get stats from min/max as per the specs.



-- 
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-unsubscribe@arrow.apache.org

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