Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5349

RelJson should support non-standard operators

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.33.0
    • core

    Description

      I am attempting to deserialize RexNodes that contain non-standard operators but RexJson#toOp only considers operators found in SqlStdOperatorTable: https://github.com/apache/calcite/blob/c945b7f49b99538748c871557f6ac80957be2b6e/core/src/main/java/org/apache/calcite/rel/externalize/RelJson.java#L780

      For example, attempting to deserialize a JSON RexCall that includes the BigQuery only `DATE_FROM_UNIX_DATE` operator raises CalciteException: No operator for 'DATE_FROM_UNIX_DATE' with kind: 'OTHER_FUNCTION', syntax: 'FUNCTION' during JSON deserialization

      Unless I am missing something, I don't believe the operator lookup is configurable or overridable.

      Attachments

        Issue Links

          Activity

            People

              tjbanghart TJ Banghart
              tjbanghart TJ Banghart
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 10m
                  10m