You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"MfpPlan::create_from and is_temporal_filter should agree"
1900
+
);
1879
1901
returnErr(format!(
1880
1902
"Unsupported temporal predicate. Note: `mz_now()` must be directly compared to a mz_timestamp-castable expression. Expression found: {}",
1881
1903
MirScalarExpr::CallBinary{ func, expr1, expr2 },
@@ -1913,7 +1935,15 @@ pub mod plan {
1913
1935
));
1914
1936
}
1915
1937
}
1938
+
soft_assert_or_log!(
1939
+
is_temporal_filter,// successfully found a temporal filter
1940
+
"MfpPlan::create_from and is_temporal_filter should agree"
1941
+
);
1916
1942
}else{
1943
+
soft_assert_or_log!(
1944
+
!is_temporal_filter,
1945
+
"MfpPlan::create_from and is_temporal_filter should agree"
1946
+
);
1917
1947
returnErr(format!(
1918
1948
"Unsupported temporal predicate. Note: `mz_now()` must be directly compared to a non-temporal expression of mz_timestamp-castable type. Expression found: {}",
Copy file name to clipboardExpand all lines: test/sqllogictest/temporal.slt
+44-1Lines changed: 44 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -245,6 +245,9 @@ WHERE insert_ts >= mz_now() - 30;
245
245
statement ok
246
246
CREATE TABLE t2(ts timestamp, x int);
247
247
248
+
statement ok
249
+
INSERT INTO t2 VALUES ('2024-01-03 00:00:00', 5), ('2024-01-04 00:00:00', 6);
250
+
248
251
statement ok
249
252
SELECT *
250
253
FROM t2
@@ -256,6 +259,9 @@ SELECT *
256
259
FROM t2
257
260
WHERE ts + INTERVAL '30' minutes >= mz_now();
258
261
262
+
statement ok
263
+
SELECT * FROM mv1;
264
+
259
265
query error db error: ERROR: WHERE clause error: operator does not exist: mz_timestamp \- interval
260
266
SELECT *
261
267
FROM t2
@@ -313,15 +319,21 @@ WHERE
313
319
ts + INTERVAL '30' minutes >= mz_now();
314
320
315
321
statement ok
316
-
SELECT * FROM v_one_off;
322
+
SELECT * FROM v_maintained;
317
323
318
324
statement ok
319
325
CREATE DEFAULT INDEX ON v_maintained;
320
326
327
+
statement ok
328
+
SELECT * FROM v_maintained;
329
+
321
330
statement ok
322
331
CREATE MATERIALIZED VIEW mv2 AS
323
332
SELECT * FROM v_maintained;
324
333
334
+
statement ok
335
+
SELECT * FROM mv2;
336
+
325
337
simple
326
338
DECLARE c CURSOR FOR SUBSCRIBE v_maintained;
327
339
FETCH 0 c;
@@ -338,6 +350,9 @@ WHERE
338
350
ts + INTERVAL '30' minutes >= mz_now()
339
351
AND x != 7;
340
352
353
+
statement ok
354
+
SELECT * FROM mv3;
355
+
341
356
# UNION ALL workaround for OR
342
357
343
358
query error db error: ERROR: Unsupported temporal predicate\. Note: `mz_now\(\)` must be directly compared to a non\-temporal expression of mz_timestamp\-castable type\. Expression found: \(\(#1\{x\} = 7\) OR \(timestamp_to_mz_timestamp\(\(#0\{ts\} \+ 00:30:00\)\) >= mz_now\(\)\)\)
@@ -363,3 +378,31 @@ UNION ALL
363
378
ts + INTERVAL '30' minutes >= mz_now()
364
379
AND x != 7
365
380
);
381
+
382
+
statement ok
383
+
SELECT * FROM mv4;
384
+
385
+
# Regression test for https://github.com/MaterializeInc/database-issues/issues/9643
386
+
# Two different temporal filters on different reads of the same source.
0 commit comments