-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using st_d_within with Nullable<Geography> #21
Comments
Hello @GioF, my understanding is that functions like that are working properly only in case parameters are not null, otherwise, in case any geometry is NULL it will return NULL, which is kind of unexpected anyway and comparison with FALSE anyway will be failed. Here is an example of requests and results: select ST_DWithin(track, track, 0) from laps; result:
select ST_DWithin(track, null, 0) from laps; result with nulls:
And another example with result = 0: select count(*) from laps where ST_DWithin(track, null, 0); Maybe it is possible to check the null value on code level and pass only not null geometries? But also maybe it should be supported like it is supported on PG side, with nullable parameters and nullable result, I will think about how to do that, or you can create a PR for that. |
feat: #21 support functions with nullable parameters and return type
Functions which support nullable parameters are implemented in separate module functions_nullable, this is done because return type should have also being changed and it could lead to backward incompatible changes. Example of usage in d_within_test Implemented in v2.3.0. |
Sadly i couldn't take a look on how to implement this because i was busy with personal matters, but i will look into the code to learn a bit. Either way, thanks! |
This is great! Also a big thank you from me. |
The error above appears when attempting to call st_d_within with a column of type Nullable.
The text was updated successfully, but these errors were encountered: