jiayuasu opened a new issue, #3202:
URL: https://github.com/apache/sedona/issues/3202

   ### Problem
   
   The two-argument Geography overload for `ST_MakeLine` can fail when either 
supported input is empty:
   
   ```sql
   SELECT ST_AsText(
     ST_MakeLine(
       ST_GeogFromWKT('POINT EMPTY', 4326),
       ST_GeogFromWKT('POINT (1 0)', 4326)
     )
   );
   ```
   
   After empty coordinates are skipped, the result can contain zero or one 
coordinate. JTS accepts an empty LineString but rejects a one-coordinate 
LineString with:
   
   ```text
   Invalid number of points in LineString (found 1 - must be 0 or >= 2)
   ```
   
   ### Expected behavior
   
   - Ignore empty Point and LineString components.
   - Return `LINESTRING EMPTY` when no coordinates remain.
   - When exactly one coordinate remains, duplicate it to produce a valid 
zero-length JTS/OGC LineString while preserving the same point set.
   - Preserve the first input's SRID.
   - Cover Point and LineString empties in common, Spark, and Flink tests.
   
   PostGIS and SedonaDB skip empty components but can represent or emit a 
one-coordinate LineString. Duplicating the remaining coordinate is the 
valid-JTS adaptation.
   
   This follow-up depends on the Geography `ST_MakeLine` overload introduced by 
#3195.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to