Kristin Cowalcijk created SEDONA-311:
----------------------------------------
Summary: Refactor InferredExpression to handle functions with
arbitrary arity
Key: SEDONA-311
URL: https://issues.apache.org/jira/browse/SEDONA-311
Project: Apache Sedona
Issue Type: Improvement
Reporter: Kristin Cowalcijk
{{sedona-sql}} has several base classes for wrapping Java functions as ST
functions in Spark SQL, namely {{InferredUnaryExpression}},
{{InferredBinaryExpression}}, {{InferredTernaryExpression}}, and
{{InferredQuarternaryExpression}}. The code of these base classes is highly
similar. If we want to wrap functions with more than 4 parameters, we must
duplicate the code to handle that particular arity.
We'll refactor these {{Inferred*Expression}} base classes to handle functions
with arbitrary (<=16 actually) parameters while making the code less bloated.
This will make wrapping new functions with lots of parameters such as
{{ST_Affine}} much easier.
We may also refactor raster functions to use the {{InferredExpression}} base
class. We know that many RS functions have lots of parameters, so this
refactoring of {{Inferred*Expression}} is a necessary step to refactor RS
functions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)