Skip to content

[Bug]: Remaining JSON function gaps (JSON_VALID/KEYS/TYPE/REMOVE/MERGE_*/CONTAINS_PATH/OVERLAPS, CONVERT AS JSON) — v3.0.11 & 4.0-dev #24738

Closed

Description

@dengn

Summary

After the recent JSON-function additions (#24509 / #24670 — thanks; JSON_ARRAY / JSON_OBJECT / JSON_ARRAYAGG / JSON_LENGTH now work on the 4.0-dev line), the following JSON functions are still unsupported as of nightly-0bfda604 (and on prod v3.0.11). Filing as a consolidated remainder; related to batch tracker #24481.

Function 3.0.11 4.0-dev Error
JSON_VALID ❌ ❌ not supported: function or operator 'json_valid'
JSON_KEYS ❌ ❌ ... 'json_keys'
JSON_TYPE ❌ ❌ ... 'json_type'
JSON_REMOVE ❌ ❌ ... 'json_remove'
JSON_MERGE_PATCH / JSON_MERGE_PRESERVE ❌ ❌ ... 'json_merge_patch'
JSON_CONTAINS_PATH ❌ ❌ ... 'json_contains_path'
JSON_OVERLAPS ❌ ❌ ... 'json_overlaps'
CONVERT(expr, JSON) ❌ ❌ parser error near " JSON)" (note: CAST(expr AS JSON) works)
JSON_OBJECTAGG ❌ ✅ (3.0.11 only)

JSON_CONTAINS is tracked separately in #24732. JSON_SET / JSON_INSERT / JSON_REPLACE / JSON_EXTRACT / JSON_UNQUOTE / JSON_QUOTE and the -> / ->> operators all work.

Steps to Reproduce

SELECT JSON_VALID('{}');
SELECT JSON_KEYS('{"a":1}');
SELECT JSON_TYPE(CAST('[]' AS JSON));
SELECT JSON_REMOVE('{"a":1,"b":2}', '$.a');
SELECT JSON_MERGE_PATCH('{"a":1}', '{"b":2}');
SELECT JSON_CONTAINS_PATH('{"a":1}', 'one', '$.a');
SELECT JSON_OVERLAPS('[1,2]', '[2,3]');
SELECT CONVERT('[1,2]', JSON);

Each → ERROR 20105 (HY000): not supported: function or operator '...' (or parser error for CONVERT(... JSON)).

Expected Behavior

MySQL implements all of these JSON functions.


Found during deep Prisma ORM (v5.22) / MySQL-compat testing; reproduced on prod 8.0.30-MatrixOne-v3.0.11 and nightly-0bfda604.

Activity

  1. added
    kind/bug
    on May 31, 2026
  2. added
    severity/s0
    on Jun 2, 2026
  3. added theissue type on Jun 2, 2026
  4. added this to the MO-202606 milestone on Jun 2, 2026
  5. daviszhen commented on Jun 10, 2026

    @daviszhen
    Contributor

    done:

    • contains
    • remove
    • contains_path
    • JSON_MERGE_PATCH / JSON_MERGE_PRESERVE
    • overlap
    • convert(... as json)

    JSON_OBJECTAGG已经在main实现了.

  6. modified the milestones: MO-202606, MO-202607 on Jun 30, 2026
  7. added
    ai-medium
    on Jul 1, 2026
  8. added
    ai-light
    and removed
    ai-medium
    on Jul 9, 2026
  9. ghost closed this as completedon Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-lightkind/bugseverity/s0

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions