Uploaded image for project: 'Apache Sedona'
  1. Apache Sedona
  2. SEDONA-4

Graceful handling of null geometries in ST_Distance function

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.2.0

    Description

      Using the ST_Distance function with a null geometry triggers a java.lang.NullPointerException error.

      Expected behaviour is for the function to return null.

      This is a problem in situations when you can't guarantee a geometry isn't null; such as when using lead and lag with windowing. The workaround is to use a case statement to test for null geoms.

      Platform tested on: AWS EMR with Pyspark 3.0.0 (Python 3.7.9) and Sedona 1.3.2 SNAPSHOT.

      I suspect this issue exists in other functions as well but haven't tested.

      Attachments

        Issue Links

          Activity

            People

              jiayu Jia Yu
              minus34 Hugh Saalmans
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m