Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-22289

JSON_TABLE: Some types for regular columns are not supported by parser

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: N/A
    • Fix Version/s: N/A
    • Component/s: JSON, Parser
    • Labels:
      None

      Description

      As far as I can tell, there is no limitation in the documentation (standard or MySQL) on data types for regular columns, apart from it being a scalar type. However, some types are not supported by MariaDB implementation:

      bb-10.5-hf 6dfb3fab2

      select * from json_table('{"a":"b"}',"$" columns(a text path '$.a')) foo;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'text path '$.a')) foo' at line 1
      

      MySQL 8.0.19

      select * from json_table('{"a":"b"}',"$" columns(a text path '$.a')) foo;
      +------+
      | a    |
      +------+
      | b    |
      +------+
      1 row in set (0.001 sec)
      

      Same for at least BLOB and GEOMETRY type. The list is not complete.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              holyfoot Alexey Botchkov
              Reporter:
              elenst Elena Stepanova
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: