KaiqiJinWow opened a new issue, #18705:
URL: https://github.com/apache/iceberg/issues/18705

   ### Feature Request / Improvement
   
   Iceberg writes spatial `lower_bounds` and `upper_bounds` for `geometry` 
columns in Parquet files. Add these metrics for spherical `geography`, per file 
and column. Longitude wraps at ±180°, and great circle edges can reach 
latitudes beyond their endpoints.
   
   Split the work into steps:
   
   1. Merge covered longitude intervals across the antimeridian. Bound memory 
use by widening intervals when needed.
   2. Compute bounds for points and minor great circle edges, including 
latitude extrema and poles. Use world bounds for ambiguous edges.
   3. Parse geography WKB and combine bounds per file and column. Use world 
bounds for nonempty polygons initially.
   4. Write the metrics from generic and Spark Parquet writers.
   
   Every box must cover all nonempty values in its column. Omit that column's 
bounds for the entire file if any value is malformed or unsupported, or if 
interpolation is unsupported. Keep existing count and size metrics. Initial 
scope is XY bounds; scan planning is separate work.
   
   Tests should check coverage across the antimeridian, along curved edges, and 
after interval compaction. Writer tests should verify the recorded bounds, 
counts, and sizes.
   
   Related: [#17788](https://github.com/apache/iceberg/pull/17788) (closed, 
unmerged spherical bounds proposal), 
[#17161](https://github.com/apache/iceberg/pull/17161) and 
[#18501](https://github.com/apache/iceberg/pull/18501) (merged geometry 
support).
   
   ### Willingness to contribute
   
   I plan to contribute this in small PRs, starting with longitude interval 
accumulation.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to