Skip to content
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

[SEDONA-673] Fix issue when loading geoparquet file without bbox metadata. #1681

Merged

Conversation

Imbruced
Copy link
Member

@Imbruced Imbruced commented Nov 14, 2024

Did you read the Contributor Guide?

Is this PR related to a JIRA ticket?

This PR is related to JIRA ticket SEDONA-673.

What changes were proposed in this PR?

When reading geoparquet which does not have bbox in metadata query like below fails with Index OutofBoundException

sparkSession.read
        .format("geoparquet")
        .load(overtureBBOX)
        .where("ST_Intersects(geometry, ST_PolygonFromEnvelope(0, 0, 1, 1))")
        .count()

The issue was when evaluating predicate pushdowns

How to reproduce
Download data with the command

uv run overturemaps download --bbox 0,0,1,1 -f geoparquet --type=place -o bbox.geoparquet

then try to load it with some predicate like contains or within.

How was this patch tested?

Unit test testing the given issue

Did this PR include necessary documentation updates?

  • No, this PR does not affect any public API so no need to change the documentation.

@Kontinuation Kontinuation changed the title Fix issue when loading geoparquet file. [SEDONA-673] Fix issue when loading geoparquet file. Nov 14, 2024
@Kontinuation Kontinuation changed the title [SEDONA-673] Fix issue when loading geoparquet file. [SEDONA-673] Fix issue when loading geoparquet file without bbox metadata. Nov 14, 2024
Copy link
Member

Choose a reason for hiding this comment

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

  1. Can you replicate the test to all Spark versions?
  2. Can you add comments in the test case and explain this is using a geoparquet has no bbox in metadata?

@jiayuasu jiayuasu added this to the sedona-1.7.0 milestone Nov 14, 2024
@jiayuasu jiayuasu added the bug label Nov 14, 2024
@jiayuasu jiayuasu merged commit 59aa504 into master Nov 15, 2024
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants