Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Snowflake ST_Distance and ST_HausdorffDistance throw NullPointerException on an empty geometry

Chiusa
#3,453 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #3454 di @jiayuasu — integrata

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
java
Ambito
backend, databases

Direzione di ricerca

Start with the Snowflake UDF overloads in UDFs and UDFsV2, then check how Functions.distance and Functions.hausdorffDistance handle empty geometries and compare the Spark and Flink behavior. Done means both functions return NULL for empty geometries without throwing, and the Hausdorff distance documentation matches that behavior. An open linked pull request (#3454) is already addressing this issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The Snowflake UDFs ST_Distance and ST_HausdorffDistance (both overloads, in UDFs and UDFsV2) are declared to return a primitive double, but Functions.distance and Functions.hausdorffDistance return null when either geometry is empty. The unboxing throws a NullPointerException instead of returning NULL, as these functions do in Spark and Flink.

Repro: SELECT sedona.ST_Distance(sedona.ST_GeomFromText('POINT(1 2)'), sedona.ST_GeomFromText('POLYGON EMPTY'))

The ST_HausdorffDistance docs also say an empty geometry gives 0.0, but it has returned NULL since #2730.

Lingua principale
Java
Stelle
2.4k
Fork
787
Merge medio
1g 23h
PR unite (30g)
52

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/sedona

Tutte le issue di apache/sedona

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.