paleolimbot opened a new issue, #156: URL: https://github.com/apache/sedona-db/issues/156
As @kylebarron kindly identified in https://github.com/developmentseed/lonboard/issues/891, we sometimes generate empty output batches: ```python from arro3.core import Table import sedona.db sd = sedona.db.connect() sd.read_parquet("https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-poly_geo.parquet").to_view("lakes") sd.read_parquet("https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-line_geo.parquet").to_view("rivers") sd.sql("""SELECT geometry AS lake FROM lakes WHERE "OBJECTID" = 1976""").to_view("east_lake") inlets_and_outlets = sd.sql(""" SELECT "OBJECTID", "FEAT_CODE", geometry FROM rivers JOIN east_lake ON ST_Intersects(east_lake.lake, rivers.geometry) """) table_orig = Table.from_arrow(inlets_and_outlets) col = table_orig.column("geometry") ", ".join(str(len(chunk)) for chunk in col.chunks) #> '0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0' ``` Our reader should probably skip these such that downstream libraries don't have to handle them (they are supposed to work on empty batches but most have never been tested). -- 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]
