hammer icon indicating copy to clipboard operation
hammer copied to clipboard

JSON_QUERY not recognized

Open tomrom-pomelo opened this issue 1 year ago • 0 comments

The following fails when running hammer diff:

CREATE TABLE SomeTable (
  Id String(40),
  Data JSON,
  HasSomeValue BOOL AS (IF(JSON_QUERY(Data, '$.value') IS NOT NULL), true, false)) STORED
) PRIMARY KEY (Id);

with the error:

failed to parse ddl: schema.ddl:<line_num>: got "(" while expecting ","

When I replace JSON_QUERY with JSON_VALUE, though not semantically correct, the tool is able to produce a correct diff.

tomrom-pomelo avatar Sep 11 '23 23:09 tomrom-pomelo