Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2867 JSON support
  3. CALCITE-3010

In SQL parser, move JsonValueExpression into Expression

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.20.0
    • None

    Description

      Below is the syntax definition of JsonValueExpression from ISO/SEC 19075-6:

      <JSON value expression> ::=
        <value expression> [ <JSON input clause> ]
      <JSON input clause> ::=
        FORMAT <JSON representation>
      <JSON representation> ::=
          JSON [ ENCODING { UTF8 | UTF16 | UTF32 } ]
        | <implementation-defined JSON representation option>
      

      Currently it's an individual syntax standing out of Expression for easily implementing the behavior of "implicit JSON format". As the amount of JSON functions is getting larger, the design could definitely be improved. For example, it can be categorized as a PostfixOperator[1].

      [1] https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/SqlPostfixOperator.java

      Attachments

        Issue Links

          Activity

            People

              zhztheplayer Hongze Zhang
              zhztheplayer Hongze Zhang
              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 - 20m
                  20m