Kontinuation opened a new pull request, #952: URL: https://github.com/apache/sedona/pull/952
## Did you read the Contributor Guide? - Yes, I have read [Contributor Rules](https://sedona.apache.org/latest-snapshot/community/rule/) and [Contributor Development Guide](https://sedona.apache.org/latest-snapshot/community/develop/) ## Is this PR related to a JIRA ticket? - Yes, the URL of the associated JIRA ticket is https://issues.apache.org/jira/browse/SEDONA-348. The PR name follows the format `[SEDONA-XXX] my subject`. ## What changes were proposed in this PR? Functions such as `ST_MakePoint` need to accept null as ordinates. For example, we can use `ST_MakePoint(x, y, null, m)` to construct a point object with M ordinate. This requires the `InferredExpression` to support null-tolerant functions. This patch introduces a family of `nullTolerantInferredFunction` functions for wrapping null-tolerant functions as spark catalyst expressions. For example, `makePoint` can be wrapped in this way: ```scala case class ST_MakePoint(inputExpressions: Seq[Expression]) extends InferredExpression(nullTolerantInferrableFunction4(Constructors.makePoint)) { // ... } ``` We won't check null values for function arguments when evaluating `ST_MakePoint` and it is up to the wrapped function (`makePoint` in this case) to handle null values correctly. ## How was this patch tested? We've cherry-picked this patch on top of https://github.com/apache/sedona/pull/950 and verified that it works as expected. It will be covered by more null-tolerant functions we'll implement in the future. ## Did this PR include necessary documentation updates? - No, this PR does not affect any public API so no need to change the docs. -- 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]
