heavyai / heavyai-crossfilter

JavaScript library for exploring large multivariate datasets in the browser.
Other
51 stars 20 forks source link

Change TS(9) date range format back to TS(3), and handle sub-ms date ranges with bump by 1ms #107

Closed jonvuri closed 4 years ago

jonvuri commented 4 years ago

Follow-up from https://github.com/omnisci/mapd-crossfilter/pull/87, change the date formatting back to the usual date formatting from formatFilterValue (with the effect of using TIMESTAMP(3) literals instead of TIMESTAMP(9)) and handle sub-ms date ranges (where the upper and lower bound are equal to a resolution of milliseconds) by bumping the upper bound up by 1ms and changing the comparison to " < " instead.

The main reason for this is to avoid using TIMESTAMP(9) literals, which will throw an overflow error if used with a date outside the supported TIMESTAMP(9) range of 09/21/1677 00:12:43.145224193 - 11/04/2262 23:47:16.854775807 (other TIMESTAMP precisions support a larger range of 1/1/1000 00:00:00.000000 - 12/31/2900 23:59:59.999999).