Add schema inference test

This commit is contained in:
divanik 2024-05-13 20:04:21 +00:00
parent dc8f8a9a18
commit 6ec868a3df
3 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,14 @@
1 Str1
2 Str2
3 Str3
4 Str4
DEFAULT 03036_archive1.zip::example1.csv id Nullable(Int64), data Nullable(String)
DEFAULT 03036_archive1.zip::example2.csv \N
21 Str21
22 Str22
23 Str23
24 Str24
DEFAULT 03036_archive1.zip::example1.csv id Nullable(Int64), data Nullable(String)
DEFAULT 03036_archive1.zip::example2.csv \N
UNION 03036_json_archive.zip::example11.jsonl id Nullable(Int64), data Nullable(String)
UNION 03036_json_archive.zip::example12.jsonl id Nullable(Int64), data Nullable(String)

View File

@ -0,0 +1,6 @@
select * from s3(s3_conn, filename='03036_archive1.zip :: example{1,2}.csv') order by tuple(*);
select schema_inference_mode, splitByChar('/', source)[-1] as file, schema from system.schema_inference_cache order by file;
set schema_inference_mode = 'union';
select * from s3(s3_conn, filename='03036_json_archive.zip :: example{11,12}.jsonl') order by tuple(*);
select schema_inference_mode, splitByChar('/', source)[-1] as file, schema from system.schema_inference_cache order by file;