dolthub / hosted-issues

Issues for hosted.doltdb.com
https://hosted.doltdb.com
2 stars 0 forks source link

Filtering on timestamp strings doesn't work correctly in Workbench UI #112

Closed fulghum closed 1 year ago

fulghum commented 1 year ago

When running a query with a filter on a string that needs to be converted into a timestamp to compare with a timestamp field, the Hosted Dolt Workbench UI returns an error like this:

Missing value for statement. 22 not provided for statement: SELECT * FROM table1 WHERE start > "2022-01-01 11:22:33"; this was provided: {}

This doesn't reproduce with a local dolt sql shell, or with a mysql client connected to the Hosted deployment – it seems like something specific happening in the Workbench UI.

Repro Steps

  1. Open the Workbench UI for a database
  2. Create a test table with a timestamp field:
    CREATE TABLE `table1` (
    `id` int NOT NULL,
    `user_id` int NOT NULL,
    `appointment_state` varchar(255),
    `start` timestamp(6),
    PRIMARY KEY (`id`),
    KEY `user_id` (`user_id`)
    );
  3. Run a query with a timestamp filter in the Workbench UI:
    SELECT * FROM table1 WHERE start > '2022-01-01 11:22:33';