Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-34507

JSON functions have wrong operand checker

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.18.1
    • None
    • Table SQL / Planner
    • None

    Description

      I believe that all JSON functions (`JSON_VALUE`, `JSON_QUERY`, ...) have wrong operand checker.

      As far as I can tell the first argument (the JSON) should be a `STRING` argument. That's what all other systems do (some accept clob/blob additionally e.g. ORACLE).

      We via Calcite accept `ANY` type there, which I believe is wrong: https://github.com/apache/calcite/blob/c49792f9c72159571f898c5fca1e26cba9870b07/core/src/main/java/org/apache/calcite/sql/fun/SqlJsonValueFunction.java#L61

      Attachments

        Activity

          People

            Unassigned Unassigned
            dwysakowicz Dawid Wysakowicz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: