Skip to content

Commit b0f4955

Browse files
committed
test(stage): test select from uri.
1 parent 27e50c0 commit b0f4955

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
--- stage
2+
1 2 3
3+
4 5 6
4+
--- uri
15
1 2 3
26
4 5 6

tests/suites/0_stateless/20+_others/20_0011_select_stage.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,20 @@
33
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
44
. "$CURDIR"/../../../shell_env.sh
55

6-
echo "drop stage if exists s1;" | $MYSQL_CLIENT_CONNECT
7-
echo "create stage s1;" | $MYSQL_CLIENT_CONNECT
8-
96
echo "drop table if exists t1;" | $MYSQL_CLIENT_CONNECT
107
echo "CREATE TABLE t1 (id INT, name VARCHAR, age INT);" | $MYSQL_CLIENT_CONNECT
11-
128
echo "insert into t1 (id,name,age) values(1,'2',3), (4, '5', 6);" | $MYSQL_CLIENT_CONNECT
13-
echo " copy into @s1 from t1 FILE_FORMAT = (type = 'PARQUET');" | $MYSQL_CLIENT_CONNECT
149

10+
echo '--- stage'
11+
echo "drop stage if exists s1;" | $MYSQL_CLIENT_CONNECT
12+
echo "create stage s1;" | $MYSQL_CLIENT_CONNECT
13+
echo "copy into @s1 from t1 FILE_FORMAT = (type = 'PARQUET');" | $MYSQL_CLIENT_CONNECT
1514
echo "select * from @s1;" | $MYSQL_CLIENT_CONNECT
15+
16+
echo '--- uri'
17+
DATADIR_PATH="/tmp/20_0011_select_stage"
18+
rm -rf ${DATADIR_PATH}
19+
DATADIR="fs://$DATADIR_PATH/"
20+
echo "copy into '${DATADIR}' from t1 FILE_FORMAT = (type = 'PARQUET');" | $MYSQL_CLIENT_CONNECT
21+
echo "select * from '${DATADIR}';" | $MYSQL_CLIENT_CONNECT
22+
rm -rf ${DATADIR_PATH}

0 commit comments

Comments
 (0)