ClickHouse/tests/queries/0_stateless/02480_s3_support_wildcard.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
2.0 KiB
MySQL
Raw Normal View History

2022-11-18 04:09:11 +00:00
-- Tags: no-parallel, no-fasttest
-- Tag no-fasttest: Depends on AWS
-- { echo }
2023-02-04 14:11:14 +00:00
drop table if exists test_02480_support_wildcard_write;
drop table if exists test_02480_support_wildcard_write2;
create table test_02480_support_wildcard_write (a UInt64, b String) engine = S3(s3_conn, filename='test_02480_support_wildcard_{_partition_id}', format=Parquet) partition by a;
2022-11-18 04:09:11 +00:00
set s3_truncate_on_insert=1;
2023-02-04 14:11:14 +00:00
insert into test_02480_support_wildcard_write values (1, 'a'), (22, 'b'), (333, 'c');
2022-11-18 04:09:11 +00:00
2023-02-04 14:11:14 +00:00
select a, b from s3(s3_conn, filename='test_02480_support_wildcard_*', format=Parquet) order by a;
select a, b from s3(s3_conn, filename='test_02480_support_wildcard_?', format=Parquet) order by a;
select a, b from s3(s3_conn, filename='test_02480_support_wildcard_??', format=Parquet) order by a;
select a, b from s3(s3_conn, filename='test_02480_support_wildcard_?*?', format=Parquet) order by a;
select a, b from s3(s3_conn, filename='test_02480_support_wildcard_{1,333}', format=Parquet) order by a;
select a, b from s3(s3_conn, filename='test_02480_support_wildcard_{1..333}', format=Parquet) order by a;
2022-11-18 04:09:11 +00:00
2023-02-04 14:11:14 +00:00
create table test_02480_support_wildcard_write2 (a UInt64, b String) engine = S3(s3_conn, filename='prefix/test_02480_support_wildcard_{_partition_id}', format=Parquet) partition by a;
2022-11-18 04:09:11 +00:00
set s3_truncate_on_insert=1;
2023-02-04 14:11:14 +00:00
insert into test_02480_support_wildcard_write2 values (4, 'd'), (55, 'f'), (666, 'g');
2022-11-18 04:09:11 +00:00
2023-02-04 14:11:14 +00:00
select a, b from s3(s3_conn, filename='*/test_02480_support_wildcard_*', format=Parquet) order by a;
select a, b from s3(s3_conn, filename='*/test_02480_support_wildcard_?', format=Parquet) order by a;
select a, b from s3(s3_conn, filename='prefix/test_02480_support_wildcard_??', format=Parquet) order by a;
select a, b from s3(s3_conn, filename='prefi?/test_02480_support_wildcard_*', format=Parquet) order by a;
select a, b from s3(s3_conn, filename='p?*/test_02480_support_wildcard_{56..666}', format=Parquet) order by a;
2022-11-18 04:09:11 +00:00
2023-02-04 14:11:14 +00:00
drop table test_02480_support_wildcard_write;
drop table test_02480_support_wildcard_write2;