readyset icon indicating copy to clipboard operation
readyset copied to clipboard

Add support for date_trunc

Open lukoktonos opened this issue 1 year ago • 1 comments

2024-02-14T20:43:58.814825Z ERROR connection:query: readyset_adapter::backend: Failed to create cache: Error during RPC (extend_recipe (in readyset-client/src/controller/rpc.rs:49:26)): SQL SELECT query 'q_ef54a3f12c2ef112' couldn't be added: MIR node '11' couldn't be lowered to dataflow: Operation unsupported: in dataflow-expression/src/lower.rs:432:18: Function date_trunc does not exist

lukoktonos avatar Feb 15 '24 18:02 lukoktonos

A simple way to reproduce:

create table dogs (id int, name varchar(56), birth_date timestamptz default CURRENT_TIMESTAMP);
insert into dogs values (1, 'kidnap'), (2, 'snoopy');
select name, date_trunc('minute', birth_date::timestamptz) from dogs;
create cache from <querry_id>;

yields this error in psql:

jasobrown-rs avatar Feb 16 '24 18:02 jasobrown-rs