petern48 commented on code in PR #741:
URL: https://github.com/apache/sedona-db/pull/741#discussion_r3036161388
##########
python/sedonadb/tests/functions/test_predicates.py:
##########
@@ -495,3 +495,55 @@ def test_st_relate(eng, geom1, geom2, expected):
f"SELECT ST_Relate({geom_or_null(geom1)}, {geom_or_null(geom2)})",
expected,
)
+
+
[email protected]("eng", [SedonaDB, PostGIS])
[email protected](
+ ("geom1", "geom2", "pattern", "expected"),
+ [
+ (None, None, None, None),
+ ("POINT (0 0)", None, "FF0FFF0F2", None),
+ (None, "POINT (0 0)", "FF0FFF0F2", None),
Review Comment:
I see that you undid this after it failed
After looking at the [CI
failure](https://github.com/apache/sedona-db/actions/runs/23986451946/job/69959059369),
I realized we're passing in `'NULL'` instead of `NULL` into the function.
```
E adbc_driver_manager.ProgrammingError: INVALID_ARGUMENT: [libpq] Failed
to execute query: could not begin COPY: ERROR: GEOSRelatePattern:
IllegalArgumentException: Unknown dimension symbol: N
E
E
E Query was: COPY (SELECT ST_Relate(ST_GeomFromText('POINT (0 0)'),
ST_GeomFromText('POINT (0 0)'), 'NULL')) TO STDOUT (FORMAT binary). SQLSTATE:
XX000
```
This is a result of applying my suggestion here
https://github.com/apache/sedona-db/pull/741#discussion_r3035740312. That's my
bad. Let's revert that change to what you had before to avoid passing a string
instead of null. i.e.
```python
pattern_sql = "NULL" if pattern is None else f"'{pattern}'"
```
And then add this test case back, and I expect it to work.
```python
("POINT (0 0)", "POINT (0 0)", None, None),
```
##########
python/sedonadb/tests/functions/test_predicates.py:
##########
@@ -156,7 +156,6 @@ def test_st_disjoint(eng, geom1, geom2, expected):
[
(None, "POINT (0 0)", 1, None),
("POINT (1 1)", None, 1.0, None),
- ("POINT (0 0)", "POINT (0 0)", None, None),
Review Comment:
Looks like you also deleted the one for the `test_st_relate` (which already
passes from your prev PR). Let's add this back. Should still pass.
--
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]