Re: Doing a calculation in a query?

2016-10-10 Thread DuyHai Doan
Assuming you're using Cassandra 3.0 or more, User Defined Functions (UDF) can help you to compute the shipment_delay. For the ordering, since this column is computed and not a clustering column, ordering won't be possible More details about UDF: http://www.doanduyhai.com/blog/?p=1876 On Mon, Oct

Doing a calculation in a query?

2016-10-10 Thread Ali Akhtar
I have a table for tracking orders. Each order has an `ordered_at` field (can be a timestamp, or a long with the milliseconds of the timestamp) and `shipped_at` field (ditto, timestamp or long). orderd_at tracks when the order was made. shipped_at tracks when the order was shipped. When