-
Notifications
You must be signed in to change notification settings - Fork 158
Closed
Labels
Medium priorityCreated by Linear-GitHub SyncCreated by Linear-GitHub Sync
Milestone
Description
There is an InnoDB-specific syntax for multi-valued indices coming from JSON expressions:
mysql> create table t (x json);
Query OK, 0 rows affected (0.09 sec)
mysql> insert into t values ('{"foo": [42, 45]}');
Query OK, 1 row affected (0.01 sec)
mysql> alter table t add index ((cast(x->>'$.foo' as signed array)));
Query OK, 0 rows affected (0.05 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> select cast(x->>'$.foo' as signed array) from t;
ERROR 1235 (42000): This version of MySQL doesn't yet support 'Use of CAST( .. AS .. ARRAY) outside of functional index in CREATE(non-SELECT)/ALTER TABLE or in general expressions'
This is not supported by either nom-sql or sqlparser. It will need an upstream fix.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Medium priorityCreated by Linear-GitHub SyncCreated by Linear-GitHub Sync