pitrou commented on code in PR #45459: URL: https://github.com/apache/arrow/pull/45459#discussion_r2016156526
########## python/pyarrow/_parquet.pyx: ########## @@ -319,6 +319,84 @@ cdef _box_flba(ParquetFLBA val, uint32_t len): return cp.PyBytes_FromStringAndSize(<char*> val.ptr, <Py_ssize_t> len) +cdef class GeoStatistics(_Weakrefable): + """Statistics for columns with geospatial data types""" + + def __cinit__(self): + pass + + def __repr__(self): + return f"""{object.__repr__(self)} + geospatial_types: {self.geospatial_types} + xmin: {self.xmin}, xmax: {self.xmax} + ymin: {self.ymin}, ymax: {self.ymax} + zmin: {self.zmin}, zmax: {self.zmax} + mmin: {self.mmin}, mmax: {self.mmax}""" + + def to_dict(self): + out = { + "geospatial_types": self.geospatial_types, + "xmin": self.xmin, + "xmax": self.xmax, + "ymin": self.ymin, + "ymax": self.ymax, + "zmin": self.zmin, + "zmax": self.zmax, + "mmin": self.mmin, + "mmax": self.mmax + } + + return out + + @property + def geospatial_types(self): + return list(self.statistics.geospatial_types) + + @property + def xmin(self): + return self.statistics.xmin Review Comment: I don't understand, is this assuming that `has_x` (and `has_y`) always returns true on the C++ side? -- 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