Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.9k
[Vectorized][Function] Support geolocation functions on vectorized engine#8790
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
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -17,18 +17,22 @@ | ||
| #pragma once | ||
| #include <s2/s2cap.h> | ||
| #include <s2/s2point.h> | ||
| #include <s2/s2polygon.h> | ||
| #include <s2/s2polyline.h> | ||
| #include <memory> | ||
| #include <string> | ||
| #include <vector> | ||
| #include "geo/geo_common.h" | ||
| #include "geo/wkt_parse_type.h" | ||
| class S2Polyline; | ||
| class S2Polygon; | ||
| class S2Cap; | ||
| template <typename T> | ||
| class Vector3; | ||
| typedef Vector3<double> Vector3_d; | ||
| using S2Point = Vector3_d; | ||
| namespace doris { | ||
| class GeoShape { | ||
| @@ -59,15 +63,18 @@ class GeoShape { | ||
| class GeoPoint : public GeoShape { | ||
| public: | ||
| GeoPoint() {} | ||
| ~GeoPoint() override {} | ||
| GeoPoint(); | ||
| ~GeoPoint() override; | ||
| GeoParseStatus from_coord(double x, double y); | ||
| GeoParseStatus from_coord(const GeoCoordinate& point); | ||
| GeoShapeType type() const override { return GEO_SHAPE_POINT; } | ||
| const S2Point& point() const { return _point; } | ||
| const S2Point* point() const { return _point.get(); } | ||
| static bool ComputeDistance(double x_lng, double x_lat, double y_lng, double y_lat, | ||
| double* distance); | ||
| std::string to_string() const override; | ||
| std::string as_wkt() const override; | ||
| @@ -80,13 +87,13 @@ class GeoPoint : public GeoShape { | ||
| bool decode(const void* data, size_t size) override; | ||
| private: | ||
| S2Point _point; | ||
| std::unique_ptr<S2Point> _point; | ||
Gabriel39 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| }; | ||
| class GeoLine : public GeoShape { | ||
| public: | ||
| GeoLine() {} | ||
| ~GeoLine() override {} | ||
| GeoLine(); | ||
| ~GeoLine() override; | ||
| GeoParseStatus from_coords(const GeoCoordinateList& list); | ||
| @@ -105,8 +112,8 @@ class GeoLine : public GeoShape { | ||
| class GeoPolygon : public GeoShape { | ||
| public: | ||
| GeoPolygon() {} | ||
| ~GeoPolygon() override {} | ||
| GeoPolygon(); | ||
| ~GeoPolygon() override; | ||
| GeoParseStatus from_coords(const GeoCoordinateListList& list); | ||
| @@ -126,8 +133,8 @@ class GeoPolygon : public GeoShape { | ||
| class GeoCircle : public GeoShape { | ||
| public: | ||
| GeoCircle() {} | ||
| ~GeoCircle() {} | ||
| GeoCircle(); | ||
| ~GeoCircle() override; | ||
| GeoParseStatus init(double lng, double lat, double radius); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.