don't convert to uint64

This commit is contained in:
ryan
2018-04-09 13:28:32 +02:00
parent 00524e6827
commit 113bfb3d3e
2 changed files with 13 additions and 6 deletions

View File

@ -85,5 +85,12 @@ func TestMacroEngine(t *testing.T) {
So(sql, ShouldEqual, "select 18446744066914187038")
})
timeRange := &tsdb.TimeRange{From: "-315622800000", To: "315529200000"} // 1960-1980
Convey("interpolate __timeFilter function before epoch", func() {
sql, err := engine.Interpolate(query, timeRange, "WHERE $__timeFilter(time_column)")
So(err, ShouldBeNil)
So(sql, ShouldEqual, "WHERE extract(epoch from time_column) BETWEEN -315622800 AND 315529200")
})
})
}