You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/12/01 10:28:28 UTC

[GitHub] [arrow] jorisvandenbossche commented on a change in pull request #8809: ARROW-10778: [Python] Fix RowGroupInfo.statistics for empty row groups

jorisvandenbossche commented on a change in pull request #8809:
URL: https://github.com/apache/arrow/pull/8809#discussion_r533291547



##########
File path: python/pyarrow/_dataset.pyx
##########
@@ -929,7 +929,8 @@ class RowGroupInfo:
         def name_stats(i):
             col = self.metadata.column(i)
 
-            if not col.statistics.has_min_max:
+            stats = col.statistics
+            if stats is None or not stats.has_min_max:

Review comment:
       Another option would be to check `col.is_stats_set`, but that results in `col.statistics` being None, so this is just as good




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

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