paleolimbot commented on PR #635:
URL: https://github.com/apache/sedona-db/pull/635#issuecomment-3922694134
While it's not hurting anybody for it to continue to exist, we should
definitely recommend more explicit syntax now that we have it available. You
have to be a database expert familiar with the concept of `barrier()` to know
what will happen here, and you have to have read the documentation very closely
to know to use:
```sql
SELECT h.name AS hotel, r.name AS restaurant, r.rating
FROM hotels AS h
INNER JOIN restaurants AS r ON ST_KNN(h.geometry, r.geometry, 3, false)
WHERE barrier('rating > 4.0 AND stars >= 4', 'rating', r.rating, 'stars',
h.stars)
```
Since we can now type this:
```sql
SELECT h.name AS hotel, r.name AS restaurant, r.rating
FROM hotels AS h
INNER JOIN restaurants AS r ON ST_KNN(h.geometry, r.geometry, 3, false)
WHERE rating > 4.0 AND stars >= 4
```
...we may as well recommend it and remove the hack before it becomes widely
used. We can always add it back if it is requested.
--
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]