featurebase icon indicating copy to clipboard operation
featurebase copied to clipboard

Timeunit ms doesn't seem to be functioning correctly

Open jbryson3 opened this issue 2 years ago • 0 comments

Using the latest docker image Molecula Pilosa v3.35.0-1-g3fd29cbb (Apr 4 2023 2:45PM, 3fd29cbb) go1.20.2 I created a simple table with SQL in the UI following the example in the documentation

Running this code

create table demo
  (_id id, ts timestamp timeunit 'ms');

insert into demo(_id, ts) 
  values (1, 1695943004481);
-- 1695943004481 is "2023-09-28T23:16:44.481Z" in ms since epoch

select * from demo;

Results in the following error json: error calling MarshalJSON for type time.Time: Time.MarshalJSON: year outside of range [0,9999]

When I truncate the timestamp by 1000, it works fine.

insert into demo(_id, ts) 
  values (1, 1695943004);

select * from demo;
-- succeeds

jbryson3 avatar Sep 28 '23 23:09 jbryson3