diff --git a/tests/queries/0_stateless/02521_avro_union_null_nested.reference b/tests/queries/0_stateless/02521_avro_union_null_nested.reference new file mode 100644 index 00000000000..e4818b4bcac --- /dev/null +++ b/tests/queries/0_stateless/02521_avro_union_null_nested.reference @@ -0,0 +1,15 @@ +manifest_path String +manifest_length Int64 +partition_spec_id Int32 +added_snapshot_id Nullable(Int64) +added_data_files_count Nullable(Int32) +existing_data_files_count Nullable(Int32) +deleted_data_files_count Nullable(Int32) +partitions Array(Tuple(contains_null Bool, contains_nan Nullable(Bool), lower_bound Nullable(String), upper_bound Nullable(String))) +added_rows_count Nullable(Int64) +existing_rows_count Nullable(Int64) +deleted_rows_count Nullable(Int64) +file:/warehouse/nyc.db/taxis/metadata/f9e891e9-fbd3-4411-a5c6-0cc14a2f1392-m0.avro 6488 0 1793608066486471262 8 0 0 [(false,false,'\0\0\0\0\0\0\0','\b\0\0\0\0\0\0\0')] 12 0 0 +file:/warehouse/nyc.db/taxis/metadata/a51dd31d-ea86-42dd-82d1-1981332a0f6d-m0.avro 6363 0 5735460159761889536 4 0 0 [(false,false,'\0\0\0\0\0\0\0','\b\0\0\0\0\0\0\0')] 4 0 0 +file:/warehouse/nyc.db/taxis/metadata/7ae325bd-fe20-4a55-917c-36cb8f6a488c-m0.avro 6370 0 7171740521400098346 4 0 0 [(false,false,'\0\0\0\0\0\0\0','\0\0\0\0\0\0\0')] 4 0 0 +file:/warehouse/nyc.db/taxis/metadata/5e3c62a9-1537-455f-98e5-0a067af5752a-m0.avro 6324 0 6850377589038341628 2 0 0 [(false,false,'\0\0\0\0\0\0\0','\0\0\0\0\0\0\0')] 4 0 0 diff --git a/tests/queries/0_stateless/02521_avro_union_null_nested.sh b/tests/queries/0_stateless/02521_avro_union_null_nested.sh new file mode 100755 index 00000000000..d3c6200100a --- /dev/null +++ b/tests/queries/0_stateless/02521_avro_union_null_nested.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# Tags: no-parallel, no-fasttest + +set -e + +CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CUR_DIR"/../shell_config.sh + +DATA_DIR=$CUR_DIR/data_avro + +$CLICKHOUSE_LOCAL -q "desc file('$DATA_DIR/union_null_nested.avro')" +$CLICKHOUSE_LOCAL -q "select * from file('$DATA_DIR/nullable_array.avro')" diff --git a/tests/queries/0_stateless/02522_avro_complicate_schema.reference b/tests/queries/0_stateless/02522_avro_complicate_schema.reference new file mode 100644 index 00000000000..55c0369020f --- /dev/null +++ b/tests/queries/0_stateless/02522_avro_complicate_schema.reference @@ -0,0 +1,5 @@ +status Int32 +snapshot_id Nullable(Int64) +data_file Tuple(file_path String, file_format String, partition Tuple(vendor_id Nullable(Int64)), record_count Int64, file_size_in_bytes Int64, block_size_in_bytes Int64, column_sizes Array(Tuple(key Int32, value Int64)), value_counts Array(Tuple(key Int32, value Int64)), null_value_counts Array(Tuple(key Int32, value Int64)), nan_value_counts Array(Tuple(key Int32, value Int64)), lower_bounds Array(Tuple(key Int32, value String)), upper_bounds Array(Tuple(key Int32, value String)), key_metadata Nullable(String), split_offsets Array(Int64), sort_order_id Nullable(Int32)) +1 6850377589038341628 ('file:/warehouse/nyc.db/taxis/data/vendor_id=1/00000-0-c070e655-dc44-43d2-a01a-484f107210cb-00001.parquet','PARQUET',(1),2,1565,67108864,[(1,87),(2,51),(3,51),(4,57),(5,51)],[(1,2),(2,2),(3,2),(4,2),(5,2)],[(1,0),(2,0),(3,0),(4,0),(5,0)],[(3,0),(4,0)],[(1,'\0\0\0\0\0\0\0'),(2,'³C\0\0\0\0\0'),(3,'ffæ?'),(4,'¤p=\n×£.@'),(5,'N')],[(1,'\0\0\0\0\0\0\0'),(2,'¶C\0\0\0\0\0'),(3,'ffA'),(4,'q=\n×£E@'),(5,'Y')],NULL,[4],0) +1 6850377589038341628 ('file:/warehouse/nyc.db/taxis/data/vendor_id=2/00000-0-c070e655-dc44-43d2-a01a-484f107210cb-00002.parquet','PARQUET',(2),2,1620,67108864,[(1,87),(2,51),(3,51),(4,57),(5,89)],[(1,2),(2,2),(3,2),(4,2),(5,2)],[(1,0),(2,0),(3,0),(4,0),(5,0)],[(3,0),(4,0)],[(1,'\0\0\0\0\0\0\0'),(2,'´C\0\0\0\0\0'),(3,'fff?'),(4,'…ëQ¸"@'),(5,'N')],[(1,'\0\0\0\0\0\0\0'),(2,'µC\0\0\0\0\0'),(3,'\0\0 @'),(4,'fffff&6@'),(5,'N')],NULL,[4],0) diff --git a/tests/queries/0_stateless/02522_avro_complicate_schema.sh b/tests/queries/0_stateless/02522_avro_complicate_schema.sh new file mode 100755 index 00000000000..fa23c7e6f34 --- /dev/null +++ b/tests/queries/0_stateless/02522_avro_complicate_schema.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# Tags: no-parallel, no-fasttest + +set -e + +CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CUR_DIR"/../shell_config.sh + +DATA_DIR=$CUR_DIR/data_avro + +$CLICKHOUSE_LOCAL -q "desc file('$DATA_DIR/complicated_schema.avro')" +$CLICKHOUSE_LOCAL -q "select * from file('$DATA_DIR/complicated_schema.avro')" diff --git a/tests/queries/0_stateless/data_avro/complicated_schema.avro b/tests/queries/0_stateless/data_avro/complicated_schema.avro new file mode 100644 index 00000000000..a3385f4b23b Binary files /dev/null and b/tests/queries/0_stateless/data_avro/complicated_schema.avro differ diff --git a/tests/queries/0_stateless/data_avro/union_null_nested.avro b/tests/queries/0_stateless/data_avro/union_null_nested.avro new file mode 100644 index 00000000000..c5246c3dd64 Binary files /dev/null and b/tests/queries/0_stateless/data_avro/union_null_nested.avro differ