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

Improve null handling of JsonValueExpressionOperator

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.20.0
    • Component/s: 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

            • Assignee:
              zhztheplayer Hongze Zhang
              Reporter:
              zhztheplayer Hongze Zhang

              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

                  Issue deployment