Skip to content

Commit

Permalink
update planner test
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
  • Loading branch information
BugenZhao committed Nov 6, 2023
1 parent cbfcea1 commit 4b1e456
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/frontend/planner_test/tests/testdata/output/agg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@
Bind error: failed to bind expression: avg(a) FILTER(WHERE abs(a))
Caused by:
internal error: argument of FILTER must be boolean, not type Int32
argument of FILTER must be boolean, not type Int32
- name: filter clause + subquery
sql: |
create table t(a int, b int);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
- sql: |
create table t (v1 int, v2 int);
delete from t where v1;
binder_error: 'internal error: argument of WHERE must be boolean, not type Int32'
binder_error: argument of WHERE must be boolean, not type Int32
- sql: |
select * from generate_series('2'::INT,'10'::INT,'2'::INT);
batch_plan: |-
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/planner_test/tests/testdata/output/expr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@
sql: |
create table t (v1 timestamp with time zone, v2 timestamp with time zone);
select * from t where v1 >= now() or v2 >= now();
stream_error: 'internal error: Conditions containing now must be of the form `input_expr cmp now() [+- const_expr]` or `now() [+- const_expr] cmp input_expr`, where `input_expr` references a column and contains no `now()`.'
stream_error: Conditions containing now must be of the form `input_expr cmp now() [+- const_expr]` or `now() [+- const_expr] cmp input_expr`, where `input_expr` references a column and contains no `now()`.
- name: now inside HAVING clause
sql: |
create table t (v1 timestamp with time zone, v2 int);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
├─LogicalScan { table: t1, columns: [t1.v1] }
└─LogicalProject { exprs: [t2.v2, t2.v3, ('2021-04-01 00:00:00+00:00':Timestamptz + t2.v3) as $expr1] }
└─LogicalScan { table: t2, columns: [t2.v2, t2.v3] }
stream_error: 'internal error: Conditions containing now must be of the form `input_expr cmp now() [+- const_expr]` or `now() [+- const_expr] cmp input_expr`, where `input_expr` references a column and contains no `now()`.'
stream_error: Conditions containing now must be of the form `input_expr cmp now() [+- const_expr]` or `now() [+- const_expr] cmp input_expr`, where `input_expr` references a column and contains no `now()`.
- name: now() in complex cmp expr pushed onto join ON clause results in dynamic filter
sql: |
create table t1(v1 timestamp with time zone);
Expand All @@ -291,7 +291,7 @@
├─LogicalScan { table: t1, columns: [t1.v1] }
└─LogicalProject { exprs: [t2.v2, t2.v3, ('2021-04-01 00:00:00+00:00':Timestamptz + t2.v3) as $expr1] }
└─LogicalScan { table: t2, columns: [t2.v2, t2.v3] }
stream_error: 'internal error: Conditions containing now must be of the form `input_expr cmp now() [+- const_expr]` or `now() [+- const_expr] cmp input_expr`, where `input_expr` references a column and contains no `now()`.'
stream_error: Conditions containing now must be of the form `input_expr cmp now() [+- const_expr]` or `now() [+- const_expr] cmp input_expr`, where `input_expr` references a column and contains no `now()`.
- name: now() does not get pushed to scan, but others do
sql: |
create table t1(v1 timestamp with time zone, v2 int);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
sql: |-
create table t1 (ts timestamp with time zone);
select * from t1 where now() - interval '15 minutes' > ts;
stream_error: 'internal error: All `now()` exprs were valid, but the condition must have at least one now expr as a lower bound.'
stream_error: All `now()` exprs were valid, but the condition must have at least one now expr as a lower bound.
- name: Temporal filter reorders now expressions correctly
sql: |
create table t1 (ts timestamp with time zone);
Expand Down

0 comments on commit 4b1e456

Please sign in to comment.