Repository navigation
Introduce Geometry type and input some functions for this type - #83344
Conversation
|
Workflow [PR], commit [855e4be] Summary: ⏳
|
|
Related: #79493 We can also support other functions (area, perimeter, etc.) for the new unified Geometry type. |
|
@nikitamikhaylov I would like to implement other functions in separate PRs to make code review process easier |
|
@alexey-milovidov could you please take a look once again? |
|
Please add docs here - even if the geo type is preliminary/experimental for now (the docs should say so). |
|
@scanhex12, this is an amazing change, one of my dreams! Please add the documentation and resolve conflicts. |
alexey-milovidov
left a comment
There was a problem hiding this comment.
Everything else LGTM.
| @@ -0,0 +1,34 @@ | |||
| SET allow_suspicious_variant_types = 1; | |||
There was a problem hiding this comment.
Because Geometry uses POLYGON and MULTILINESTRING which are equals to each other
There was a problem hiding this comment.
Then it makes the new Geometry data type unusable without the experimental setting.
Let's make sure the Variant data type accepts distinct aliases to the same type.
| auto try_deserialize_type = [&] (const std::function<void()> & deserialize_func, const String & data, const String & target_prefix, WKTTypes type) -> bool | ||
| { | ||
| try | ||
| auto lower_data = boost::to_lower_copy(data); |
There was a problem hiding this comment.
There are three problems:
- We do lowercase many times instead of just one.
- We do it for all the string, which can be large, instead of just for the type name.
- We do string comparison multiple times, while we can do it in a single pass.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Introduce
Geometrytype. Support readingWKBandWKTformats for it. In previous versions, theGeometrytype was aliased toString, but now it is a full-featured type.Documentation entry for user-facing changes