substrait-io / substrait

A cross platform way to express data transformation, relational algebra, standardized record expression and plans.
https://substrait.io
Apache License 2.0
1.16k stars 150 forks source link

feat: add precision timestamp datetime fn variants #666

Closed vbarua closed 1 month ago

vbarua commented 1 month ago

This PR adds functions variants for PrecisionTimestamp and PrecisionTimestampTZ to aid in migrating off of the the deprecated Timestamp and TimestampTZ types.

Not all functions can be given variants easily. For example for

  -
    name: "add"
      - args:
          - name: x
            value: date
          - name: y
            value: interval_day
        return: timestamp

We cannot add a precision_timestamp variant because it would only differ in the output type. Choosing not to handle these for now.

vbarua commented 1 month ago

I've loaded these into substrait-java successfully.