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

In RelJson, add a 'readExpression' method that can convert JSON to a RexNode expression

    XMLWordPrintableJSON

Details

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

    Description

      In the case of our project, the environment that generates a JSON from a RexNode and the environment that reads it are different. We need to "translate" the inputs into their aliases in the new cluster. 
      This method will permit to give more freedom to the JSON RexNode parser if needed. 

      /**
         * Transforms a RexNode tree defined in a map (from a JSON) into a RexNode
         * Applying a special method to inputs instead of transforming them into inputRef
         * @param cluster The optimization environment
         * @param apply is a InputTranslator lambda that transforms the map representing input
         *               references into a RexNode
         * @param o the map derived from a RexNode transformed into a JSON
         * @return the transformed RexNode
         */
      

      Make sure that RexNode toRex(RelInput relInput, @PolyNull Object o) is still working + adding tests

      Attachments

        Issue Links

          Activity

            People

              mkou Marieke Gueye
              mkou Marieke Gueye
              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 - 50m
                  50m