pitrou commented on code in PR #45459: URL: https://github.com/apache/arrow/pull/45459#discussion_r2016157968
########## 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) Review Comment: This is going to return a list of integers? Perhaps call this `raw_geospatial_types` in case we want to later return a list of strings or Python enum values. -- 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