yutannihilation commented on PR #183:
URL: https://github.com/apache/sedona-db/pull/183#issuecomment-3371850823

   During adding these tests, I found PostGIS raise errors for these two cases 
where my implementation returns `NULL`.
   
   The first one is two `NULL`s. I think test should not fail with this error 
because `NULL::geometry` works. However, casting to geometry doesn't work on 
SedonaDB yet.
   
   ```
   postgres=# SELECT ST_Azimuth(NULL, NULL);
   ERROR:  function st_azimuth(unknown, unknown) is not unique
   LINE 1: SELECT ST_Azimuth(NULL, NULL);
                  ^
   HINT:  Could not choose a best candidate function. You might need to add 
explicit type casts.
   ```
   
   The second one is empty point. I thought this returns `NULL` without errors, 
but it seems PostGIS doesn't allow empty point. I think we can follow this 
behavior.
   
   ```
   postgres=# SELECT ST_Azimuth(ST_Point(0, 0), ST_GeomFromText('POINT EMPTY'));
   NOTICE:  lwgeom_api.c [351] called with n=0 and npoints=0
   ERROR:  Error extracting point
   ```


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