Skip to content

Commit

Permalink
add planner test
Browse files Browse the repository at this point in the history
Signed-off-by: Runji Wang <[email protected]>
  • Loading branch information
wangrunji0408 committed Mar 7, 2024
1 parent 49b8708 commit 5a900e2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/frontend/planner_test/tests/testdata/input/expr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -454,3 +454,15 @@
expected_outputs:
- batch_plan
- stream_error
- name: without variadic keyword
sql: |
create table t(a varchar, b varchar);
select concat_ws(',', a, b) from t;
expected_outputs:
- batch_plan
- name: with variadic keyword
sql: |
create table t(a varchar, b varchar);
select concat_ws(',', variadic array[a, b]) from t;
expected_outputs:
- batch_plan
16 changes: 16 additions & 0 deletions src/frontend/planner_test/tests/testdata/output/expr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -635,3 +635,19 @@
Not supported: streaming nested-loop join
HINT: The non-equal join in the query requires a nested-loop join executor, which could be very expensive to run. Consider rewriting the query to use dynamic filter as a substitute if possible.
See also: https://github.com/risingwavelabs/rfcs/blob/main/rfcs/0033-dynamic-filter.md
- name: without variadic keyword
sql: |
create table t(a varchar, b varchar);
select concat_ws(',', a, b) from t;
batch_plan: |-
BatchExchange { order: [], dist: Single }
└─BatchProject { exprs: [ConcatWs(',':Varchar, t.a, t.b) as $expr1] }
└─BatchScan { table: t, columns: [t.a, t.b], distribution: SomeShard }
- name: with variadic keyword
sql: |
create table t(a varchar, b varchar);
select concat_ws(',', variadic array[a, b]) from t;
batch_plan: |-
BatchExchange { order: [], dist: Single }
└─BatchProject { exprs: [ConcatWsVariadic(',':Varchar, Array(t.a, t.b)) as $expr1] }
└─BatchScan { table: t, columns: [t.a, t.b], distribution: SomeShard }

0 comments on commit 5a900e2

Please sign in to comment.