Copilot commented on code in PR #3130:
URL: https://github.com/apache/sedona/pull/3130#discussion_r3612129905


##########
spark/common/src/main/scala/org/apache/spark/sql/sedona_sql/io/stac/StacBatch.scala:
##########
@@ -166,120 +173,151 @@ case class StacBatch(
     val linksNode = rootNode.get("links")
     val iterator = linksNode.elements()

Review Comment:
   `collectItemLinks` assumes the collection JSON always contains a `links` 
array (`rootNode.get("links").elements()`), which will throw a 
NullPointerException if `links` is missing or not an array. Since this method 
already handles other malformed metadata defensively (e.g., in pagination), it 
should guard here too and just return without adding links.



-- 
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