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

Improve null handling of JsonValueExpressionOperator

    XMLWordPrintableJSON

Details

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

    Description

      In Calcite's implementation, JsonValueExpressionOperator currently returns a null value no matter the argument is JSON NULL value or SQL NULL value. But in MySQL, some JSON functions behave differently on different null inputs. For instance for a MySQL JSON function JSON_STORAGE_SIZE, if we execute:

      SELECT JSON_STORAGE_SIZE(null), JSON_STORAGE_SIZE('null')
      

      The result should be:

      JSON_STORAGE_SIZE(null) JSON_STORAGE_SIZE('null')
      null 2

      We should improve the operator a bit to support different behaviors.

      Attachments

        Issue Links

          Activity

            People

              zhztheplayer Hongze Zhang
              zhztheplayer Hongze Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 1.5h
                  1.5h