diff --git a/tests/cases/standalone/common/view/tql_eval.result b/tests/cases/standalone/common/view/tql_eval.result index 704ba763969..dd6d6525c28 100644 --- a/tests/cases/standalone/common/view/tql_eval.result +++ b/tests/cases/standalone/common/view/tql_eval.result @@ -25,16 +25,40 @@ SELECT * FROM tql_view; SHOW CREATE VIEW tql_view; -+----------+---------------------------------------------------------------------+ -| View | Create View | -+----------+---------------------------------------------------------------------+ -| tql_view | CREATE VIEW tql_view AS TQL EVAL (0, 0, '1s', '5m') tql_view_source | -+----------+---------------------------------------------------------------------+ ++----------+-------------------------------------------------------------------------+ +| View | Create View | ++----------+-------------------------------------------------------------------------+ +| tql_view | CREATE VIEW tql_view AS TQL EVAL ('0', '0', '1s', '5m') tql_view_source | ++----------+-------------------------------------------------------------------------+ DROP VIEW tql_view; Affected Rows: 0 +CREATE VIEW tql_view_rfc3339 AS TQL EVAL ('1970-01-01T00:00:00Z', '1970-01-01T00:00:00Z', '1s', '5m') tql_view_source; + +Affected Rows: 0 + +SELECT * FROM tql_view_rfc3339; + ++---------------------+------+-----+ +| ts | host | val | ++---------------------+------+-----+ +| 1970-01-01T00:00:00 | a | 2.0 | ++---------------------+------+-----+ + +SHOW CREATE VIEW tql_view_rfc3339; + ++------------------+-----------------------------------------------------------------------------------------------------------------------+ +| View | Create View | ++------------------+-----------------------------------------------------------------------------------------------------------------------+ +| tql_view_rfc3339 | CREATE VIEW tql_view_rfc3339 AS TQL EVAL ('1970-01-01T00:00:00Z', '1970-01-01T00:00:00Z', '1s', '5m') tql_view_source | ++------------------+-----------------------------------------------------------------------------------------------------------------------+ + +DROP VIEW tql_view_rfc3339; + +Affected Rows: 0 + DROP TABLE tql_view_source; Affected Rows: 0 diff --git a/tests/compatibility/cases/tql_view_persistence/verify.result b/tests/compatibility/cases/tql_view_persistence/verify.result new file mode 100644 index 00000000000..13a56b59a28 --- /dev/null +++ b/tests/compatibility/cases/tql_view_persistence/verify.result @@ -0,0 +1,28 @@ +-- Instant evaluation at 1000s honours the 10m lookback stored in the persisted view +-- plan: 41 is 399.999s old but still selected, 12 sits exactly on the grid point. +SELECT ts, series, val FROM tql_view_instant ORDER BY series; + ++---------------------+-------------------------+------+ +| ts | series | val | ++---------------------+-------------------------+------+ +| 1970-01-01T00:16:40 | at_eval | 12.0 | +| 1970-01-01T00:16:40 | beyond_default_lookback | 41.0 | ++---------------------+-------------------------+------+ + +SHOW CREATE VIEW tql_view_instant; + ++------------------+----------------------------------------------------------------------------------------+ +| View | Create View | ++------------------+----------------------------------------------------------------------------------------+ +| tql_view_instant | CREATE VIEW tql_view_instant AS TQL EVAL ('1000', '1000', '1s', '10m') tql_view_source | ++------------------+----------------------------------------------------------------------------------------+ + +-- The range view binds its own 2s window, so only the sample at the evaluation point +-- survives; the column names come from the plan persisted by the old binary. +SELECT * FROM tql_view_range; + ++---------------------+----------------------------------+---------+ +| ts | prom_max_over_time(ts_range,val) | series | ++---------------------+----------------------------------+---------+ +| 1970-01-01T00:16:40 | 12.0 | at_eval | ++---------------------+----------------------------------+---------+