Skip to content

Commit

Permalink
add test for delta table engine.
Browse files Browse the repository at this point in the history
  • Loading branch information
youngsofun committed Dec 7, 2023
1 parent fb3a193 commit 31edb4e
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/suites/1_stateful/12_delta/11_0000_delta_engine.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
>>>> drop table if exists test_delta;
>>>> create table test_delta engine = delta location = 'fs://${ROOT}/';
>>>> select * from test_delta order by id;
0
1
2
3
4
<<<<
>>>> drop table test_delta;
>>>> drop connection if exists s3_conn;
>>>> create connection s3_conn storage_type = 's3' access_key_id ='minioadmin' secret_access_key ='minioadmin' ENDPOINT_URL='http://127.0.0.1:9900';
>>>> create table test_delta engine = delta location = 's3://testbucket/admin/data/delta/delta-table' connection_name = 's3_conn' ;
>>>> select * from test_delta order by id;
0
1
2
3
4
<<<<
>>>> show create table test_delta;
test_delta CREATE TABLE `test_delta` (
`id` INT NULL
) ENGINE=DELTA CONNECTION_NAME='s3_conn' LOCATION='s3://testbucket/admin/data/delta/delta-table'
<<<<
>>>> drop table test_delta;
25 changes: 25 additions & 0 deletions tests/suites/1_stateful/12_delta/11_0000_delta_engine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. "$CURDIR"/../../../shell_env.sh

ROOT=$(realpath "$CURDIR"/../../../data/delta/delta-table/)

stmt "drop table if exists test_delta;"

echo ">>>> create table test_delta engine = delta location = 'fs://\${ROOT}/';"
echo "create table test_delta engine = delta location = 'fs://${ROOT}/';" | $BENDSQL_CLIENT_CONNECT
# stmt "create table test_delta engine = delta location = 'fs://${ROOT}/';"
query "select * from test_delta order by id;"
stmt "drop table test_delta;"

stmt "drop connection if exists s3_conn;"
stmt "create connection s3_conn storage_type = 's3' access_key_id ='minioadmin' secret_access_key ='minioadmin' ENDPOINT_URL='http://127.0.0.1:9900';"

echo ">>>> create table test_delta engine = delta location = 's3://testbucket/admin/data/delta/delta-table' connection_name = 's3_conn' ;"
echo "create table test_delta engine = delta location = 's3://testbucket/admin/data/delta/delta-table' connection_name = 's3_conn';" | $BENDSQL_CLIENT_CONNECT
query "select * from test_delta order by id;"
query "show create table test_delta;"
stmt "drop table test_delta;"


0 comments on commit 31edb4e

Please sign in to comment.