-
Notifications
You must be signed in to change notification settings - Fork 17
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
Avoid panics in GEOS geometry construction #217
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
It looks like it's still failing CI...
@@ -125,7 +125,7 @@ impl<'a, O: OffsetSizeTrait> GeometryArrayTrait<'a> for GeometryCollectionArray< | |||
/// This operation is `O(1)` as it amounts to increase two ref counts. | |||
/// # Examples | |||
/// ``` | |||
/// use arrow2::array::PrimitiveArray; | |||
/// use arrow::array::PrimitiveArray; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just finished a migration from arrow2 to arrow-rs and the docstrings haven't been updated yet (not that they were accurate before either; they were copied from arrow2). Could you revert these specific changes to make it clear that these docstring examples don't work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, there's a whole bunch of these docstrings that need to be updated, so ideally we'll be intentional about fixing them in some sort of dedicated PR, ideally restoring doctest = true
as well
Lines 58 to 60 in 29930b0
[lib] | |
# TODO: fix docstrings | |
doctest = false |
src/array/linestring/array.rs
Outdated
@@ -130,7 +130,7 @@ impl<'a, O: OffsetSizeTrait> GeometryArrayTrait<'a> for LineStringArray<O> { | |||
"ARROW:extension:name".to_string(), | |||
"geoarrow.linestring".to_string(), | |||
); | |||
Arc::new(Field::new("", self.storage_type(), true).with_metadata(field_metadata)) | |||
Arc::new(Field::new("geometry", self.storage_type(), true).with_metadata(field_metadata)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm reluctant to call this "geometry"
because we don't know the actual name of the field referring to the data in this column (and e.g. there could be two geometry columns in one table). I might switch this to return the field metadata directly instead of a full FieldRef
(ref #218)
Sorry I don't realize that i didn't enable geos feature to test changes locally... P.S. I'm new to geo, so some changes might be stupid. I'm now working on adding geo support for datafusion, just find this great crate, thanks for your work. |
Thanks! |
depending on your OS, you might be able to install geos through a package manager |
No description provided.