james-willis commented on code in PR #1225:
URL: https://github.com/apache/sedona-db/pull/1225#discussion_r3929228361
##########
rust/sedona-geometry/src/types.rs:
##########
@@ -429,6 +429,28 @@ impl GeometryTypeAndDimensionsSet {
current_bit: 0,
}
}
+
+ /// The distinct geometry types in this set, in bitset iteration order.
+ pub fn geometry_types(&self) -> Vec<GeometryTypeId> {
+ let mut out = Vec::new();
+ for item in self.iter() {
+ if !out.contains(&item.geometry_type()) {
+ out.push(item.geometry_type());
+ }
+ }
+ out
+ }
+
+ /// The distinct dimensions in this set, in bitset iteration order.
+ pub fn dimensions(&self) -> Vec<Dimensions> {
+ let mut out = Vec::new();
+ for item in self.iter() {
+ if !out.contains(&item.dimensions()) {
+ out.push(item.dimensions());
+ }
+ }
+ out
+ }
Review Comment:
done. probably doesnt really matter.
I added them to the class because I assumed itd be useful for future users
and doesn't really cost anything. seems like a better home than in the UDF impl
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]