paleolimbot opened a new pull request, #656: URL: https://github.com/apache/sedona-db/pull/656
Fixes the aggregation from a view type: we had been assuming that the state was identical to the input; however, this is not the case if the input is a view type for the grouped accumulator. ```python import sedona.db sd = sedona.db.connect() url = "https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-point.parquet" sd.read_parquet(url).to_view("pts") sd.sql("""SELECT COUNT(*) AS n, ST_Envelope_Agg(geometry) FROM pts GROUP BY "FEAT_CODE" """).show() #> ┌───────┬──────────────────────────────────────────────────────────────────────────────────────────┐ #> │ n ┆ st_envelope_agg(pts.geometry) │ #> │ int64 ┆ geometry │ #> ╞═══════╪══════════════════════════════════════════════════════════════════════════════════════════╡ #> │ 90 ┆ POLYGON((270897.72809999995 4826136.883300001,270897.72809999995 5187201.8673,701852.51… │ #> ├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ #> │ 1 ┆ POINT(421205.36319999956 4983412.968) │ #> ├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ #> │ 193 ┆ POLYGON((267934.5273000002 4851581.779999999,267934.5273000002 5169404.282400001,671731… │ #> ├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ #> │ 44406 ┆ POLYGON((228998.02589999977 4807909.8791000005,228998.02589999977 5234453.594900001,758… │ #> └───────┴──────────────────────────────────────────────────────────────────────────────────────────┘ ``` Closes #653. -- 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]
