[MDEV-25138] JSON_TABLE: A space between JSON_TABLE and opening bracket causes syntax error Created: 2021-03-15  Updated: 2021-04-21  Resolved: 2021-03-26

Status: Closed
Project: MariaDB Server
Component/s: JSON, Parser
Affects Version/s: N/A
Fix Version/s: 10.6.0

Type: Bug Priority: Blocker
Reporter: Elena Stepanova Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-17399 Add support for JSON_TABLE Closed

 Description   

select * from json_table ('{}', '$' COLUMNS(x FOR ORDINALITY)) a;

bb-10.6-mdev17399-psergey2 8b533cc1d5

MariaDB [db]> select * from json_table ('{}', '$' COLUMNS(x FOR ORDINALITY)) a;
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 '('{}', '$' COLUMNS(x FOR ORDINALITY)) a' at line 1

It works in MySQL:

MySQL 8.0.23

MySQL [db]> select * from json_table ('{}', '$' COLUMNS(x FOR ORDINALITY)) a;
+------+
| x    |
+------+
|    1 |
+------+
1 row in set (0.001 sec)

Given the expected complexity of statements involving JSON_TABLE, I think it's important to allow for pretty multi-line formatting of all sorts (it's not the same as having this limitation for a simple single-argument function like COUNT).



 Comments   
Comment by Elena Stepanova [ 2021-03-23 ]

Raising it to a technical blocker because it will likely require making JSON_TABLE a reserved word, and we probably can't do it after beta.

Generated at Thu Feb 08 09:35:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.