Skip to content

chore: Upgrade org.locationtech.jts version to 1.20.0#26646

Merged
nishithakbhaskaran merged 1 commit intoprestodb:masterfrom
sumi-mathew:upgarde_locationtech
Jan 27, 2026
Merged

chore: Upgrade org.locationtech.jts version to 1.20.0#26646
nishithakbhaskaran merged 1 commit intoprestodb:masterfrom
sumi-mathew:upgarde_locationtech

Conversation

@sumi-mathew
Copy link
Copy Markdown
Contributor

@sumi-mathew sumi-mathew commented Nov 18, 2025

Description

Upgrade org.locationtech.jts version to 1.20.0

Motivation and Context

Using a more recent version helps avoid potential vulnerabilities and ensures we aren't relying on outdated or unsupported code.

Impact

Test Plan

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.
  • If adding new dependencies, verified they have an OpenSSF Scorecard score of 5.0 or higher (or obtained explicit TSC approval for lower scores).
== NO RELEASE NOTE ==

@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Nov 18, 2025
@sumi-mathew sumi-mathew changed the title Upgrade org.locationtech.jts version to 1.20.0 chore: Upgrade org.locationtech.jts version to 1.20.0 Nov 20, 2025
@sumi-mathew sumi-mathew force-pushed the upgarde_locationtech branch from 1d747a8 to 34c960f Compare January 7, 2026 09:47
@sumi-mathew sumi-mathew marked this pull request as ready for review January 16, 2026 05:58
@sumi-mathew sumi-mathew requested a review from a team as a code owner January 16, 2026 05:58
@prestodb-ci prestodb-ci requested review from a team, ScrapCodes and anandamideShakyan and removed request for a team January 16, 2026 05:58
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Jan 16, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Upgrades the org.locationtech.jts dependency to 1.20.0 and aligns geospatial geometry validation tests with updated JTS error messages.

File-Level Changes

Change Details Files
Bump JTS library version used by the project.
  • Update the shared Maven property controlling org.locationtech.jts version from 1.19.0 to 1.20.0
  • Ensure dependent modules will resolve and build against JTS 1.20.0 without further code changes
pom.xml
Adjust geospatial invalid-geometry tests to match new JTS validation error text.
  • Update expected invalid reason string for a self-intersecting polygon from "Ring Self-intersection" to "Self-intersection" in polygon-only case
  • Update expected invalid reason string for a self-intersecting polygon inside a geometry collection from "Ring Self-intersection" to "Self-intersection"
presto-main-base/src/test/java/com/facebook/presto/geospatial/TestGeoFunctions.java

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The tests that assert exact JTS error strings (e.g., "Ring Self-intersection" vs "Self-intersection") are tightly coupled to the library’s internal messages; consider relaxing these to check for a stable substring or error type so future JTS updates don’t require test rewrites for wording changes.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The tests that assert exact JTS error strings (e.g., "Ring Self-intersection" vs "Self-intersection") are tightly coupled to the library’s internal messages; consider relaxing these to check for a stable substring or error type so future JTS updates don’t require test rewrites for wording changes.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Member

@agrawalreetika agrawalreetika left a comment

Choose a reason for hiding this comment

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

Lgtm, just have one question

assertInvalidReason("POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0), (0 1, 1 1, 0.5 0.5, 0 1))", "Self-intersection");
assertInvalidReason("POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0), (0 0, 0.5 0.7, 1 1, 0.5 0.4, 0 0))", "Interior is disconnected");
assertInvalidReason("POLYGON ((0 0, -1 0.5, 0 1, 1 1, 1 0, 0 1, 0 0))", "Ring Self-intersection");
assertInvalidReason("MULTIPOLYGON (((0 0, 0 1, 1 1, 1 0, 0 0)), ((0.5 0.5, 0.5 2, 2 2, 2 0.5, 0.5 0.5)))", "Self-intersection");
assertInvalidReason("GEOMETRYCOLLECTION (POINT (1 2), POLYGON ((0 0, 0 1, 2 1, 1 1, 1 0, 0 0)))", "Ring Self-intersection");
assertInvalidReason("GEOMETRYCOLLECTION (POINT (1 2), POLYGON ((0 0, 0 1, 2 1, 1 1, 1 0, 0 0)))", "Self-intersection");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we know what changed in tests after upgrade?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Before (1.19.0): "Ring Self-intersection" - Used for all polygon ring self-intersections
After (1.20.0): "Self-intersection" - Used for certain types of polygon self-intersections
Still Returns "Ring Self-intersection": Complex ring intersections involving multiple segments

Copy link
Copy Markdown
Member

@hantangwangd hantangwangd left a comment

Choose a reason for hiding this comment

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

Thanks @sumi-mathew

@nishithakbhaskaran nishithakbhaskaran merged commit ffa70a3 into prestodb:master Jan 27, 2026
113 of 116 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:IBM PR from IBM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants