Skip to content
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

Making geo terms non-deterministic prevents us from using them in indexes #3287

Closed
mlucy opened this issue Nov 4, 2014 · 4 comments
Closed
Assignees
Milestone

Comments

@mlucy
Copy link
Member

mlucy commented Nov 4, 2014

This seems like a major problem. @danielmewes, any thoughts?

irb(main):040:0> r.table('test').index_create('geo', geo:true){|row| r.point(row['longitude'], row['latitude'])}.run
RethinkDB::RqlRuntimeError: Could not prove function deterministic.  Index functions must be deterministic.
@mlucy mlucy added this to the 1.15.x milestone Nov 4, 2014
@danielmewes
Copy link
Member

We could definitely make the r.point() constructor deterministic again, since it doesn't perform any form of complex math (it only compares the coordinates to check that they are in range). Do you think that would help?

The same wouldn't work as easily for the other geo constructors because they use operations that are potentially suspectible to rounding errors (such as intersection tests).

@mlucy
Copy link
Member Author

mlucy commented Nov 5, 2014

That would definitely help, since points are probably 99% of what people are going to want to compute in an index function.

@danielmewes
Copy link
Member

Fix in branch daniel_3287, CR 2277

@danielmewes danielmewes modified the milestones: 1.15.2, 1.15.x Nov 5, 2014
This was referenced Nov 5, 2014
chipotle pushed a commit that referenced this issue Nov 5, 2014
@danielmewes
Copy link
Member

Fixed for r.point() in v1.15.x and next by 050963d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants