Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ydb/tests/fq/s3/test_compression_data/big.json.br
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
��S
��;�…�����^�
K�lġ�R�\���-!0
Binary file added ydb/tests/fq/s3/test_compression_data/big.json.bz2
Binary file not shown.
Binary file added ydb/tests/fq/s3/test_compression_data/big.json.gz
Binary file not shown.
Binary file added ydb/tests/fq/s3/test_compression_data/big.json.lz4
Binary file not shown.
Binary file added ydb/tests/fq/s3/test_compression_data/big.json.xz
Binary file not shown.
Binary file added ydb/tests/fq/s3/test_compression_data/big.json.zst
Binary file not shown.
18 changes: 13 additions & 5 deletions ydb/tests/fq/s3/test_compressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,26 @@ def test_compression(self, kikimr, s3, client, filename, compression, unique_pre
self.validate_result(result_set)

@yq_all
def test_zstd_unknown_frame_descriptor(self, kikimr, s3, client, unique_prefix):
self.create_bucket_and_upload_file("unknown_frame_descriptor.json.zst", s3, kikimr)
@pytest.mark.parametrize("filename, compression", [
("big.json.gz", "gzip"),
("big.json.lz4", "lz4"),
("big.json.br", "brotli"),
("big.json.bz2", "bzip2"),
("big.json.zst", "zstd"),
("big.json.xz", "xz")
])
def test_big_compression(self, kikimr, s3, client, filename, compression, unique_prefix):
self.create_bucket_and_upload_file(filename, s3, kikimr)
storage_connection_name = unique_prefix + "fruitbucket"
client.create_storage_connection(storage_connection_name, "fbucket")

sql = '''
SELECT count(*)
FROM `{}`.`unknown_frame_descriptor.json.zst`
WITH (format=json_each_row, compression="zstd", SCHEMA (
FROM `{}`.`{}`
WITH (format=json_each_row, compression="{}", SCHEMA (
a String NOT NULL
));
'''.format(storage_connection_name)
'''.format(storage_connection_name, filename, compression)

query_id = client.create_query("simple", sql, type=fq.QueryContent.QueryType.ANALYTICS).result.query_id
client.wait_query_status(query_id, fq.QueryMeta.COMPLETED)
Expand Down