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

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • N/A
    • JSON, Parser
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.