Skip to content

Commit

Permalink
Add frontend tests for concat_ws
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed May 17, 2022
1 parent 48ef1fb commit 1e4cdc3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/frontend/test_runner/tests/testdata/expr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,29 @@
create table t (v1 int);
select coalesce(1,'a') from t;
binder_error: 'Bind error: types Int32 and Varchar cannot be matched'
- sql: |
create table t (v1 varchar);
select concat_ws(v1, 1) as expr from t;
batch_plan: |
BatchExchange { order: [], dist: Single }
BatchProject { exprs: [ConcatWs($0, 1:Int32::Varchar)] }
BatchScan { table: t, columns: [v1] }
stream_plan: |
StreamMaterialize { columns: [expr, _row_id#0(hidden)], pk_columns: [_row_id#0] }
StreamProject { exprs: [ConcatWs($0, 1:Int32::Varchar), $1] }
StreamTableScan { table: t, columns: [v1, _row_id#0], pk_indices: [1] }
- sql: |
create table t (v1 varchar);
select concat_ws(v1, 1.2) from t;
batch_plan: |
BatchExchange { order: [], dist: Single }
BatchProject { exprs: [ConcatWs($0, 1.2:Decimal::Varchar)] }
BatchScan { table: t, columns: [v1] }
- sql: |
create table t (v1 int);
select concat_ws(v1, 1.2) from t;
binder_error: 'Bind error: ConcatWs function must have text as first argument'
- sql: |
create table t (v1 int);
select concat_ws() from t;
binder_error: 'Bind error: ConcatWs function must contain at least 2 arguments'

0 comments on commit 1e4cdc3

Please sign in to comment.