FeatureBaseDB / featurebase

A crazy fast analytical database, built on bitmaps. Perfect for ML applications. Learn more at: http://docs.featurebase.com/. Start a Docker instance: https://hub.docker.com/r/featurebasedb/featurebase
https://www.featurebase.com
Apache License 2.0
2.53k stars 230 forks source link

Timeunit ms doesn't seem to be functioning correctly #2385

Open jbryson3 opened 11 months ago

jbryson3 commented 11 months ago

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