-
Notifications
You must be signed in to change notification settings - Fork 761
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: test select from stage with files/pattern.
- Loading branch information
1 parent
01ad713
commit a8da034
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
tests/suites/1_stateful/08_select_stage/08_00_parquet/08_00_02_select_files.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
1 (1,'a') | ||
2 (3,'b') | ||
3 (3,'c') | ||
--- | ||
1 (1,'a') | ||
2 (3,'b') | ||
3 (3,'c') | ||
1 (1,'a') | ||
2 (3,'b') | ||
3 (3,'c') |
24 changes: 24 additions & 0 deletions
24
tests/suites/1_stateful/08_select_stage/08_00_parquet/08_00_02_select_files.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
. "$CURDIR"/../../../../shell_env.sh | ||
|
||
|
||
DATADIR_PATH="/tmp/08_00_02" | ||
rm -rf ${DATADIR_PATH} | ||
mkdir ${DATADIR_PATH} | ||
DATADIR="fs://$DATADIR_PATH/" | ||
|
||
echo "drop stage if exists s2;" | $MYSQL_CLIENT_CONNECT | ||
echo "create stage s2 url = '${DATADIR}' FILE_FORMAT = (type = PARQUET);" | $MYSQL_CLIENT_CONNECT | ||
|
||
|
||
cp "$CURDIR"/../../../../data/tuple.parquet ${DATADIR_PATH}/ | ||
cp "$CURDIR"/../../../../data/sample.csv ${DATADIR_PATH}/ | ||
|
||
echo "select * from @s2 (files => ('tuple.parquet'));" | $MYSQL_CLIENT_CONNECT | ||
|
||
echo "---" | ||
|
||
cp "$CURDIR"/../../../../data/tuple.parquet ${DATADIR_PATH}/tuple2.parquet | ||
echo "select * from @s2 (pattern => '.*parquet');" | $MYSQL_CLIENT_CONNECT |