Skip to content

Conversation

@ddupg
Copy link
Contributor

@ddupg ddupg commented Oct 22, 2025

No description provided.

@github-actions github-actions bot added enhancement New feature or request python java labels Oct 22, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ddupg ddupg mentioned this pull request Oct 22, 2025
@ddupg ddupg marked this pull request as draft October 22, 2025 12:52
@ddupg ddupg force-pushed the feat/geo-type branch 2 times, most recently from 101e660 to 5352673 Compare October 23, 2025 10:11
@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2025

Copy link

@Kontinuation Kontinuation left a comment

Choose a reason for hiding this comment

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

I'm very interested in your work. After a preliminary review of the code, I have a few suggestions/comments

@ddupg ddupg force-pushed the feat/geo-type branch 3 times, most recently from 135714d to 75c7b08 Compare October 28, 2025 09:37
@ddupg ddupg marked this pull request as ready for review October 28, 2025 10:43
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ddupg ddupg force-pushed the feat/geo-type branch 2 times, most recently from c00e492 to e1ffeb1 Compare November 3, 2025 09:50
@ddupg
Copy link
Contributor Author

ddupg commented Nov 5, 2025

The python example is currently blocked at #5144

@ddupg ddupg force-pushed the feat/geo-type branch 5 times, most recently from fbdd59f to 49cfef2 Compare November 11, 2025 02:42
@ddupg ddupg force-pushed the feat/geo-type branch 3 times, most recently from 5b53354 to 0b29e09 Compare November 19, 2025 14:07
@ddupg ddupg force-pushed the feat/geo-type branch 7 times, most recently from d15373f to 3966395 Compare November 26, 2025 02:03
"rust/lance-encoding",
"rust/lance-file",
"rust/lance-index",
"rust/lance-geo",
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a pretty big change, I would suggest we have a PR to get the lance-geo module in first, with the tests for geo type and functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK,I separate to #4678, please help review it.

Cargo.toml Outdated
] }
crossbeam-queue = "0.3"
datafusion = { version = "50.0.0", default-features = false, features = [
datafusion = { version = "50.3.0", default-features = false, features = [
Copy link
Contributor

Choose a reason for hiding this comment

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

I think let's bump datafusion in a separate PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This upgrade may be unnecessary, I just wanted to keep it consistent with the lock file. I noticed that bump datafusion 51 is in progress, so I've rolled back this bump.


/// Convert a length-1 GeoArrowArray to a geo::Geometry scalar.
pub fn bounding_box_single_scalar(arr: &dyn GeoArrowArray) -> ArrowResult<BoundingBox> {
assert_eq!(arr.len(), 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

prefer error not panic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The method is unnecessary, removed it.

let hilbert_max = ((1 << 16) - 1) as f64;
let len = rect_array.len();
let width = self.bbox.maxx() - self.bbox.minx();
let height = self.bbox.maxy() - self.bbox.miny();
Copy link
Contributor

Choose a reason for hiding this comment

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

what if the points are in the same x or y axis? seems like we need a minimum for width and height that is not zero, since I remember hilbert curve does not divide by 0 (if it does then never mind)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. In fact, division-by-zero will not occur. If all x are 0, in the subsequent expression, (bbox.minx() + bbox.maxx()) / 2. - self.bbox.minx() will yield 0, resulting in the entire expression being 0.

let x = (hilbert_max * ((bbox.minx() + bbox.maxx()) / 2. - self.bbox.minx()) / width)
                .floor() as u32;

To be safe, I've also updated the logic to guard against division-by-zero by setting the width/height to 1.0 if max equals min. This approach aligns the one used in flatbush (lines 158-171) which effectively ensures the normalization accuracy.

@ddupg ddupg force-pushed the feat/geo-type branch 2 times, most recently from 918adb1 to 9d0ab4d Compare November 26, 2025 15:05
Copy link
Contributor

Choose a reason for hiding this comment

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

And one other thing is that we should raise a separated PR + vote to add RTree to the table index spec, treat it as a spec change. This follows the new community governance rule, and also allows a pre-review of the general design. We did not do that for zone map and it caused quite a few issues, so I think let's follow the new process here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion! I’ve raised a PR #5360 outlining the RTree index spec.

Change-Id: Ic057263d3ff4e9dc7d5874e0b92687b551cfb836
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request java python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants