petern48 opened a new issue, #75:
URL: https://github.com/apache/sedona-db/issues/75

   
   It would be nice if `POINT (1 1)` was rendered instead of 
`Binary("1,1,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63") FieldMetadata { 
inner: {"ARROW:extension:metadata": "{\"crs\":\"EPSG:4326\"}", 
"ARROW:extension:name": "geoarrow.wkb"} },`
   
   ```sql
   > EXPLAIN SELECT * FROM 
'https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point_geo.parquet'
  WHERE ST_Contains(ST_SetSRID(ST_GeomFromText('point (1 1)'), 4326), geometry);
   
┌───────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
   │   plan_type   ┆                                                            
                       plan                                                     
                             │
   │      utf8     ┆                                                            
                       utf8                                                     
                             │
   
╞═══════════════╪═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡
   │ logical_plan  ┆ Filter: 
st_contains(Binary("1,1,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63") 
FieldMetadata { inner: {"ARROW:extension:metadata": "{\"crs\":\"EPSG:4326\"}", 
"ARROW:ext │
   │               ┆ ension:name": "geoarrow.wkb"} }, 
https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point_geo.parquet.geometry)
                     │
   │               ┆   TableScan: 
https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point_geo.parquet
 projection=[geometry], partial_filters=[st_contai │
   │               ┆ 
ns(Binary("1,1,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63") FieldMetadata { 
inner: {"ARROW:extension:metadata": "{\"crs\":\"EPSG:4326\"}", 
"ARROW:extension:name": "ge │
   │               ┆ oarrow.wkb"} }, 
https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point_geo.parquet.geometry)]
                                     │
   
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
   │ physical_plan ┆ CoalesceBatchesExec: target_batch_size=8192                
                                                                                
                             │
   │               ┆   FilterExec: st_contains(01010000000000000000..., 
geometry@0)                                                                     
                                     │
   │               ┆     DataSourceExec: file_groups={10 groups: 
[[geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point_geo.parquet:0..160323641],
 [geoarrow/geoarrow-d │
   │               ┆ 
ata/releases/download/v0.2.0/microsoft-buildings_point_geo.parquet:160323641..320647282],
 [geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point_ge │
   │               ┆ o.parquet:320647282..480970923], 
[geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point_geo.parquet:480970923..641294564],
 [geoarrow/geoarrow-data/ │
   │               ┆ 
releases/download/v0.2.0/microsoft-buildings_point_geo.parquet:641294564..801618205],
 ...]}, projection=[geometry], file_type=parquet                                
   │
   │               ┆                                                            
                                                                                
                             │
   
└───────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
   2 row(s)/2 column(s) fetched. 
   Elapsed 1.664 seconds.
   ```
   
   Using `EXPLAIN VERBOSE` (instead of just `EXPLAIN`), I can see that the 
initial logical plan represents it as `Utf8("point (1 1)")), Int64(4326))`, 
which is great! But eventually, Datafusion's `simplify_expressions` logical 
plan optimization is the first rule to convert that representation to this 
unreadable binary representation.


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

Reply via email to