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

geogfn: apply bounding box calculations for DWithin #50825

Merged
merged 1 commit into from
Jul 1, 2020

Conversation

otan
Copy link
Contributor

@otan otan commented Jun 30, 2020

Expand a BoundingRect by a given radius (using s2.Cap) and apply
intersection to do fairly cheap bounding box calculations before doing
the expensive DWithin logic.

Release note: None

@otan otan requested review from sumeerbhola and a team June 30, 2020 15:13
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@otan otan force-pushed the bounding_box_geogfn_d branch from d4c2ff4 to ea4b673 Compare June 30, 2020 16:38
Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @otan)


pkg/geo/geogfn/dwithin.go, line 35 at r1 (raw file):

	}

	distanceToExpand := s1.Angle(distance / spheroid.SphereRadius)

how about s/distanceToExpand/angleToExpand/

@otan otan force-pushed the bounding_box_geogfn_d branch from ea4b673 to 5907d3c Compare June 30, 2020 21:38
Copy link
Contributor Author

@otan otan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @sumeerbhola)


pkg/geo/geogfn/dwithin.go, line 35 at r1 (raw file):

Previously, sumeerbhola wrote…

how about s/distanceToExpand/angleToExpand/

Done.

Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @sumeerbhola)

@otan otan force-pushed the bounding_box_geogfn_d branch from 5907d3c to 5987119 Compare July 1, 2020 14:30
Expand a BoundingRect by a given radius (using s2.Cap) and apply
intersection to do fairly cheap bounding box calculations before doing
the expensive DWithin logic.

Release note: None
@otan otan force-pushed the bounding_box_geogfn_d branch from 5987119 to 51ddf02 Compare July 1, 2020 16:40
@otan
Copy link
Contributor Author

otan commented Jul 1, 2020

bors r=sumeerbhola

@craig
Copy link
Contributor

craig bot commented Jul 1, 2020

Build succeeded

@craig craig bot merged commit 54c7f57 into cockroachdb:master Jul 1, 2020
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

Successfully merging this pull request may close these issues.

3 participants