james-willis commented on code in PR #1070:
URL: https://github.com/apache/sedona-db/pull/1070#discussion_r3632841485
##########
python/sedonadb/python/sedonadb/raster_testing.py:
##########
@@ -330,7 +361,155 @@ def from_binary(self, data: bytes) -> DecodedRaster:
self._not_implemented("from_binary")
-class SedonaDB(RasterEngine):
+class DialectEngine(RasterEngine):
+ """A `RasterEngine` that runs the RS_* function under test as SQL.
+
+ SedonaDB and Sedona Spark are both dialect engines: an operation is one
+ RS_* call, and the compatibility contract the parity tests exist to protect
+ is that the identical call runs on both ("Spark SQL runs unchanged in
+ SedonaDB"). To make that contract structural rather than a coincidence, the
+ argument string is built in exactly one place — the `*_expr` generators
+ below — and both dialects execute whatever those return. A dialect subclass
+ supplies only its per-engine I/O: how a GeoTIFF path becomes a `rast`
column
+ and how a scalar / struct result is decoded (`_run_scalar` /
`_run_struct`).
+ The two dialects therefore cannot emit different SQL for the same
operation.
+
+ Only RS_ZonalStats / RS_ZonalStatsAll are routed through this shared
surface;
+ the other operations keep their existing per-dialect implementations.
Review Comment:
we will add more code paths here after we agree on and merge this PR.
--
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]