hammer icon indicating copy to clipboard operation
hammer copied to clipboard

Support timestamp functions

Open hamoelze opened this issue 2 years ago • 1 comments

Hello, On hammer apply or hammer diff, while creating a table with a generated column using a timestamp function, such as:

CREATE TABLE examples (
  inserted_at TIMESTAMP  NOT NULL,
  examples_id STRING(36) NOT NULL,
  examples_timestamp TIMESTAMP  AS(TIMESTAMP_ADD(inserted_at, INTERVAL 1 DAY)) STORED
) PRIMARY KEY(examples_id);

produces the following error: Error: spanner://projects/test-project/instances/test-instance/databases/example_dev failed to parse ddl: spanner://projects/test-project/instances/test-instance/databases/example_dev:4: got "1", want ")" or ","

hamoelze avatar Oct 05 '22 19:10 hamoelze

related issue: https://github.com/googleapis/google-cloud-go/issues/6949

neglect-yp avatar Oct 28 '22 06:10 neglect-yp