@@ -220,12 +220,12 @@ func TestQuery_AddTimeFilter(t *testing.T) {
220220
221221 // time_offset option
222222 f (`options(time_offset=1d3h534ms) *` , `options(time_offset=1d3h534ms) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z]` )
223- f (`options(time_offset = -1.5h) _time:1.3d ` , `options(time_offset=-1.5h) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] _time:1.3d ` )
224- f (`options(time_offset = -1.5h) _time:1.3d offset 3.5h` , `options(time_offset=-1.5h) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] _time:1.3d offset 3.5h` )
225- f (`options(time_offset = -1.5h) _time:1.3d offset -3.5h` , `options(time_offset=-1.5h) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] _time:1.3d offset -3.5h` )
226- f (`options(time_offset=1h) id:in(_time:5m | keep id)` , `options(time_offset=1h) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] id:in(_time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] _time:5m | fields id)` )
227- f (`id:in(options(time_offset=1h) _time:5m | keep id)` , `_time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] id:in(options(time_offset=1h) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] _time:5m | fields id)` )
228- f (`options(time_offset=1d) id:in(options(time_offset=1h) _time:5m | keep id)` , `options(time_offset=1d) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] id:in(options(time_offset=1h) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] _time:5m | fields id)` )
223+ f (`options(time_offset = -1.5h) _time:2024Z ` , `options(time_offset=-1.5h) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] _time:2024Z ` )
224+ f (`options(time_offset = -1.5h) _time:2025Z offset 3.5h` , `options(time_offset=-1.5h) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] _time:2025Z offset 3.5h` )
225+ f (`options(time_offset = -1.5h) _time:2025Z offset -3.5h` , `options(time_offset=-1.5h) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] _time:2025Z offset -3.5h` )
226+ f (`options(time_offset=1h) id:in(_time:2025Z | keep id)` , `options(time_offset=1h) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] id:in(_time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] _time:2025Z | fields id)` )
227+ f (`id:in(options(time_offset=1h) _time:2025Z | keep id)` , `_time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] id:in(options(time_offset=1h) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] _time:2025Z | fields id)` )
228+ f (`options(time_offset=1d) id:in(options(time_offset=1h) _time:2025Z | keep id)` , `options(time_offset=1d) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] id:in(options(time_offset=1h) _time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] _time:2025Z | fields id)` )
229229
230230 // join pipe
231231 f (`foo | join by (x) (bar)` , `_time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] foo | join by (x) (_time:[2024-12-25T14:56:43Z,2025-01-13T12:45:34Z] bar)` )
@@ -1319,6 +1319,13 @@ func TestParseQuery_Success(t *testing.T) {
13191319 f (`_time:1h (Offset)` , `_time:1h "Offset"` ) // "offset" is a search word, since it is in parens
13201320 f (`_time:1h "and"` , `_time:1h "and"` ) // "and" is a search word, since it is quoted
13211321
1322+ // multiple _time filters
1323+ f (`_time:1h _time:2025Z` , `_time:1h _time:2025Z` )
1324+ f (`_time:<10h _time:2025Z` , `_time:<10h _time:2025Z` )
1325+ f (`_time:2025Z _time:[2024-10Z, 2025-03Z]` , `_time:2025Z _time:[2024-10Z,2025-03Z]` )
1326+ f (`options(time_offset=1h) _time:2025Z _time:[2024-10Z, 2025-03Z]` , `options(time_offset=1h) _time:2025Z _time:[2024-10Z,2025-03Z]` )
1327+ f (`_time:2025Z _time:2024Z _time:10y` , `_time:2025Z _time:2024Z _time:10y` )
1328+
13221329 // dayRange filters
13231330 f (`_time:day_range[08:00, 20:30)` , `_time:day_range[08:00, 20:30)` )
13241331 f (`_time:day_range(08:00, 20:30)` , `_time:day_range(08:00, 20:30)` )
0 commit comments