Skip to content

[Compatibility]: MySQL MEMBER OF JSON operator is rejected by the parser #28035

Closed as not planned

Description

@Ariznawlll

Description

The MySQL JSON membership operator value MEMBER OF(json_array) is not accepted by the MatrixOne parser.

Environment

  • Branch: main
  • Commit: 17c161a31b47a22e71ca222839143f66717ac365
  • Deployment: local single-node MatrixOne
  • Test date: 2026-09-03

Steps to reproduce

SELECT 17 MEMBER OF('[23, "abc", 17]');\n```\n\n## Actual behavior\n\nThe statement fails with a syntax error at `OF`.\n\n## Expected behavior\n\nMySQL returns `1` for a matching JSON-array element, `0` for a nonmatching element, and `NULL` when either operand is SQL `NULL`.\n\n## Stability and controls\n\n- Reproducer: parser rejection was identical in 3/3 rounds.\n- Control: `JSON_CONTAINS('{"a":"x"}', '"x"', '$.a')` returned `1` on the same service.\n- Failure atomicity: the reproducer is a read-only expression.\n\n## Evidence\n\nhttps://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html\n\n## Code analysis\n\nThe MySQL grammar and function registry contain no `MEMBER OF` implementation.\n\n## Regression coverage\n\nAfter implementation, add BVT cases for numeric/string/JSON values, no match, SQL `NULL`, malformed JSON, and predicates over JSON columns.

Activity

  1. added
    kind/bug
    on Sep 3, 2026
  2. added this to the MO-202609 milestone on Sep 3, 2026
  3. added theissue type on Sep 3, 2026
  4. VioletQwQ-0 commented on Sep 3, 2026

    @VioletQwQ-0
    Collaborator

    Closing as a duplicate of #23008. Both issues track the same missing MySQL MEMBER OF JSON operator/parser support. #23008 is the canonical issue and already carries the implementation ownership and parser discussion; please continue implementation and validation there.

  5. added
    duplicate
    and removed on Sep 3, 2026
  6. added
    no-pr-linked
    on Sep 3, 2026
  7. VioletQwQ-0 commented on Sep 3, 2026

    @VioletQwQ-0
    Collaborator

    Repository automation reopened this duplicate because it has no PR-originated link. There is no independent fix PR for this duplicate and creating one solely to bypass closure automation would be incorrect. Keeping this item deferred and labeled duplicate; #23008 remains the canonical implementation and validation tracker. This item can be closed together with the canonical fix once its real PR is linked.

  8. removed their assignment
    on Sep 3, 2026
  9. removed
    no-pr-linked
    on Sep 4, 2026
  10. XuPeng-SH commented on Oct 23, 2026

    @XuPeng-SH
    Contributor

    This report duplicates #23008: both track the missing MySQL MEMBER OF JSON operator/parser support. The canonical implementation was merged in PR #28096 and the original operator, prepared-statement, and WHERE-consumer paths have since passed QA on current main (recorded on #23008).

    Closing this duplicate now that the canonical fix and QA are complete. The reproduction and original report remain here for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

duplicatekind/bug

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions