Uploaded image for project: 'Apache Sedona'
  1. Apache Sedona
  2. SEDONA-311

Refactor InferredExpression to handle functions with arbitrary arity

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.5.0

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kontinuation Kristin Cowalcijk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m