daichirata/hammer

JSON_QUERY not recognized

tomrom-pomelo opened this issue · 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.