Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.18.1
-
None
-
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