diff options
| author | Roman Udovichenko <[email protected]> | 2024-06-10 19:39:49 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-10 19:39:49 +0300 |
| commit | e06ffef1c53eb4d07979deb6be393b4ad6516044 (patch) | |
| tree | 065a84f76e6312bd1e0857913af67e2d056f7534 | |
| parent | 5b2264954da2ff5c8d861877db109ab2532c81ff (diff) | |
[yt provider] Fix sampling tests (#5391)
| -rw-r--r-- | ydb/library/yql/tests/sql/dq_file/part7/canondata/result.json | 24 | ||||
| -rw-r--r-- | ydb/library/yql/tests/sql/dq_file/part7/canondata/test.test_sampling-io_block_size_pragma--Analyze_/extracted | 3 | ||||
| -rw-r--r-- | ydb/library/yql/tests/sql/hybrid_file/part3/canondata/result.json | 14 | ||||
| -rw-r--r-- | ydb/library/yql/tests/sql/sql2yql/canondata/result.json | 22 | ||||
| -rw-r--r-- | ydb/library/yql/tests/sql/suites/sampling/io_block_size_pragma.sql | 14 | ||||
| -rw-r--r-- | ydb/library/yql/tests/sql/suites/sampling/system_sampling-io_block_size.cfg (renamed from ydb/library/yql/tests/sql/suites/sampling/io_block_size_pragma.cfg) | 2 | ||||
| -rw-r--r-- | ydb/library/yql/tests/sql/suites/sampling/system_sampling.cfg | 1 | ||||
| -rw-r--r-- | ydb/library/yql/tests/sql/suites/sampling/system_sampling.sql | 2 | ||||
| -rw-r--r-- | ydb/library/yql/tests/sql/yt_native_file/part17/canondata/result.json | 14 | ||||
| -rw-r--r-- | ydb/library/yql/tests/sql/yt_native_file/part4/canondata/result.json | 6 | ||||
| -rw-r--r-- | ydb/library/yql/tests/sql/yt_native_file/part7/canondata/result.json | 14 |
11 files changed, 25 insertions, 91 deletions
diff --git a/ydb/library/yql/tests/sql/dq_file/part7/canondata/result.json b/ydb/library/yql/tests/sql/dq_file/part7/canondata/result.json index 3fbd5a77f25..74440c33f67 100644 --- a/ydb/library/yql/tests/sql/dq_file/part7/canondata/result.json +++ b/ydb/library/yql/tests/sql/dq_file/part7/canondata/result.json @@ -2526,30 +2526,6 @@ "uri": "file://test.test_produce-reduce_all_expr-default.txt-Analyze_/extracted" } ], - "test.test[sampling-io_block_size_pragma--Analyze]": [ - { - "checksum": "e93d950a30d71d3b9e436607eab8af3c", - "size": 33258, - "uri": "https://{canondata_backend}/1597364/674fcbbcaed1c9cfba2b74e3352aab82299cbfca/resource.tar.gz#test.test_sampling-io_block_size_pragma--Analyze_/plan.txt" - }, - { - "uri": "file://test.test_sampling-io_block_size_pragma--Analyze_/extracted" - } - ], - "test.test[sampling-io_block_size_pragma--Debug]": [ - { - "checksum": "950effb9a9f0116bf6bb79a69863eed4", - "size": 10590, - "uri": "https://{canondata_backend}/1923547/4a11bf336fd7fb8da5f5162c16271b830cef13e4/resource.tar.gz#test.test_sampling-io_block_size_pragma--Debug_/opt.yql_patched" - } - ], - "test.test[sampling-io_block_size_pragma--Plan]": [ - { - "checksum": "c35710ef36d7527e44abeee0c244967d", - "size": 44709, - "uri": "https://{canondata_backend}/1937367/24a3ed09a524cab36402a50f39546eeec677142d/resource.tar.gz#test.test_sampling-io_block_size_pragma--Plan_/plan.txt" - } - ], "test.test[sampling-map-dynamic-Analyze]": [ { "checksum": "b913ead12af51bc046e1f3344ff5134c", diff --git a/ydb/library/yql/tests/sql/dq_file/part7/canondata/test.test_sampling-io_block_size_pragma--Analyze_/extracted b/ydb/library/yql/tests/sql/dq_file/part7/canondata/test.test_sampling-io_block_size_pragma--Analyze_/extracted index 33749c443c4..e69de29bb2d 100644 --- a/ydb/library/yql/tests/sql/dq_file/part7/canondata/test.test_sampling-io_block_size_pragma--Analyze_/extracted +++ b/ydb/library/yql/tests/sql/dq_file/part7/canondata/test.test_sampling-io_block_size_pragma--Analyze_/extracted @@ -1,3 +0,0 @@ -<tmp_path>/program.sql:<main>: Info: Optimization - - <tmp_path>/program.sql:<main>: Info: DQ cannot execute the query. Cause: system sampling
\ No newline at end of file diff --git a/ydb/library/yql/tests/sql/hybrid_file/part3/canondata/result.json b/ydb/library/yql/tests/sql/hybrid_file/part3/canondata/result.json index 1065c9a3dd1..553c9fb8761 100644 --- a/ydb/library/yql/tests/sql/hybrid_file/part3/canondata/result.json +++ b/ydb/library/yql/tests/sql/hybrid_file/part3/canondata/result.json @@ -2603,20 +2603,6 @@ "uri": "https://{canondata_backend}/1942671/a6ef6234ecec8bdd9b5f7ec30206378c9f7268ef/resource.tar.gz#test.test_sampling-bind_multiple_sample-default.txt-Plan_/plan.txt" } ], - "test.test[sampling-io_block_size_pragma--Debug]": [ - { - "checksum": "88c7c5df26c904f9df5bb285c0ecb1af", - "size": 5644, - "uri": "https://{canondata_backend}/1937492/7ae37c32b42bb57d4df171a62ced7ab76867a8ea/resource.tar.gz#test.test_sampling-io_block_size_pragma--Debug_/opt.yql_patched" - } - ], - "test.test[sampling-io_block_size_pragma--Plan]": [ - { - "checksum": "aa93d759fd22fbb4693b4ef1e5745e09", - "size": 22156, - "uri": "https://{canondata_backend}/1880306/c715d9724f1a9822d17de99a92187dc88e31dc1b/resource.tar.gz#test.test_sampling-io_block_size_pragma--Plan_/plan.txt" - } - ], "test.test[schema-copy-read_schema-Debug]": [ { "checksum": "111ccb12b8b27db0cfd9ef6af213df33", diff --git a/ydb/library/yql/tests/sql/sql2yql/canondata/result.json b/ydb/library/yql/tests/sql/sql2yql/canondata/result.json index fa1020cfcc1..94192812787 100644 --- a/ydb/library/yql/tests/sql/sql2yql/canondata/result.json +++ b/ydb/library/yql/tests/sql/sql2yql/canondata/result.json @@ -15287,13 +15287,6 @@ "uri": "https://{canondata_backend}/1784117/d56ae82ad9d30397a41490647be1bd2124718f98/resource.tar.gz#test_sql2yql.test_sampling-insert_/sql.yql" } ], - "test_sql2yql.test[sampling-io_block_size_pragma]": [ - { - "checksum": "fc9bff36692881b55a210a4d9c2ac16c", - "size": 2921, - "uri": "https://{canondata_backend}/1784117/d56ae82ad9d30397a41490647be1bd2124718f98/resource.tar.gz#test_sql2yql.test_sampling-io_block_size_pragma_/sql.yql" - } - ], "test_sql2yql.test[sampling-join_left_sample]": [ { "checksum": "1faedee543bb2ac9afa098b9de522acf", @@ -15429,9 +15422,9 @@ ], "test_sql2yql.test[sampling-system_sampling]": [ { - "checksum": "858d2826a4629a431df66d4722553f4c", + "checksum": "54aabd4c29bb21b0e11b8f3d724a805a", "size": 2685, - "uri": "https://{canondata_backend}/1784117/d56ae82ad9d30397a41490647be1bd2124718f98/resource.tar.gz#test_sql2yql.test_sampling-system_sampling_/sql.yql" + "uri": "https://{canondata_backend}/1775319/aea965d51c26d8dea65ed5884b04b18325ac81d2/resource.tar.gz#test_sql2yql.test_sampling-system_sampling_/sql.yql" } ], "test_sql2yql.test[sampling-table_content]": [ @@ -31058,13 +31051,6 @@ "uri": "https://{canondata_backend}/1880306/64654158d6bfb1289c66c626a8162239289559d0/resource.tar.gz#test_sql_format.test_sampling-insert_/formatted.sql" } ], - "test_sql_format.test[sampling-io_block_size_pragma]": [ - { - "checksum": "26601ed432824fa63aea0c3fc91aef16", - "size": 387, - "uri": "https://{canondata_backend}/1880306/64654158d6bfb1289c66c626a8162239289559d0/resource.tar.gz#test_sql_format.test_sampling-io_block_size_pragma_/formatted.sql" - } - ], "test_sql_format.test[sampling-join_left_sample]": [ { "checksum": "15ebf84683f48dfa9fd01672b2aca619", @@ -31200,9 +31186,9 @@ ], "test_sql_format.test[sampling-system_sampling]": [ { - "checksum": "0c1391a7ee975ac86af74a56b8e27c94", + "checksum": "e4a6c536a365c321776f7ee77172001c", "size": 335, - "uri": "https://{canondata_backend}/1880306/64654158d6bfb1289c66c626a8162239289559d0/resource.tar.gz#test_sql_format.test_sampling-system_sampling_/formatted.sql" + "uri": "https://{canondata_backend}/1775319/aea965d51c26d8dea65ed5884b04b18325ac81d2/resource.tar.gz#test_sql_format.test_sampling-system_sampling_/formatted.sql" } ], "test_sql_format.test[sampling-table_content]": [ diff --git a/ydb/library/yql/tests/sql/suites/sampling/io_block_size_pragma.sql b/ydb/library/yql/tests/sql/suites/sampling/io_block_size_pragma.sql deleted file mode 100644 index 548970348de..00000000000 --- a/ydb/library/yql/tests/sql/suites/sampling/io_block_size_pragma.sql +++ /dev/null @@ -1,14 +0,0 @@ -/* postgres can not */ -/* custom check: len(yt_res_yson[0]['Write'][0]['Data']) < 100 */ -/* syntax version 1 */ -USE plato; - -PRAGMA yt.SamplingIoBlockSize="32M"; - -EVALUATE FOR $_i IN ListFromRange(0, 10) DO BEGIN - INSERT INTO Output - SELECT * FROM Input; - COMMIT; -END DO; - -SELECT key,value FROM Output TABLESAMPLE SYSTEM(30); diff --git a/ydb/library/yql/tests/sql/suites/sampling/io_block_size_pragma.cfg b/ydb/library/yql/tests/sql/suites/sampling/system_sampling-io_block_size.cfg index fe2b19a9ff6..7544cd71118 100644 --- a/ydb/library/yql/tests/sql/suites/sampling/io_block_size_pragma.cfg +++ b/ydb/library/yql/tests/sql/suites/sampling/system_sampling-io_block_size.cfg @@ -1,3 +1,5 @@ in Input input.txt out Output output.txt res result.txt +pragma yt.SamplingIoBlockSize="32M" +providers yt diff --git a/ydb/library/yql/tests/sql/suites/sampling/system_sampling.cfg b/ydb/library/yql/tests/sql/suites/sampling/system_sampling.cfg index fe2b19a9ff6..5d963ebb218 100644 --- a/ydb/library/yql/tests/sql/suites/sampling/system_sampling.cfg +++ b/ydb/library/yql/tests/sql/suites/sampling/system_sampling.cfg @@ -1,3 +1,4 @@ in Input input.txt out Output output.txt res result.txt +providers yt diff --git a/ydb/library/yql/tests/sql/suites/sampling/system_sampling.sql b/ydb/library/yql/tests/sql/suites/sampling/system_sampling.sql index 20ded07b23b..edc20386533 100644 --- a/ydb/library/yql/tests/sql/suites/sampling/system_sampling.sql +++ b/ydb/library/yql/tests/sql/suites/sampling/system_sampling.sql @@ -9,4 +9,4 @@ EVALUATE FOR $_i IN ListFromRange(0, 10) DO BEGIN COMMIT; END DO; -SELECT * FROM Output TABLESAMPLE SYSTEM(50); +SELECT * FROM Output TABLESAMPLE SYSTEM(10); diff --git a/ydb/library/yql/tests/sql/yt_native_file/part17/canondata/result.json b/ydb/library/yql/tests/sql/yt_native_file/part17/canondata/result.json index 5585accc06d..c718cbd21da 100644 --- a/ydb/library/yql/tests/sql/yt_native_file/part17/canondata/result.json +++ b/ydb/library/yql/tests/sql/yt_native_file/part17/canondata/result.json @@ -2088,6 +2088,20 @@ "uri": "https://{canondata_backend}/1923547/68f2fa8e051f31489bd496c183d28c4abddf9f68/resource.tar.gz#test.test_sampling-bind_small_rate-default.txt-Plan_/plan.txt" } ], + "test.test[sampling-system_sampling-io_block_size-Debug]": [ + { + "checksum": "90fa4e3855ef77f1dd40d97e14d3ab5c", + "size": 4722, + "uri": "https://{canondata_backend}/1917492/0ec6e944dc67770bcab6e75460c8380c5f0e437d/resource.tar.gz#test.test_sampling-system_sampling-io_block_size-Debug_/opt.yql" + } + ], + "test.test[sampling-system_sampling-io_block_size-Plan]": [ + { + "checksum": "112e8d7188fa4c0fe64ca2a571e5085f", + "size": 33580, + "uri": "https://{canondata_backend}/1917492/0ec6e944dc67770bcab6e75460c8380c5f0e437d/resource.tar.gz#test.test_sampling-system_sampling-io_block_size-Plan_/plan.txt" + } + ], "test.test[sampling-table_content--Debug]": [ { "checksum": "09451ba6a31c9417c54d76eeaeba8aad", diff --git a/ydb/library/yql/tests/sql/yt_native_file/part4/canondata/result.json b/ydb/library/yql/tests/sql/yt_native_file/part4/canondata/result.json index bf71a8b95fd..6fbbf8a31ac 100644 --- a/ydb/library/yql/tests/sql/yt_native_file/part4/canondata/result.json +++ b/ydb/library/yql/tests/sql/yt_native_file/part4/canondata/result.json @@ -2156,9 +2156,9 @@ ], "test.test[sampling-system_sampling--Debug]": [ { - "checksum": "6b556630cb4bf4df20c5101b18f9a0ae", - "size": 4535, - "uri": "https://{canondata_backend}/1689644/d44d95f45899fdab5e5358b444eb60b407010265/resource.tar.gz#test.test_sampling-system_sampling--Debug_/opt.yql" + "checksum": "cf7606bbc830fc2b5b0f74e844506532", + "size": 4504, + "uri": "https://{canondata_backend}/1777230/73cca44aa6627e3802ff3a4f25c52080ab74151b/resource.tar.gz#test.test_sampling-system_sampling--Debug_/opt.yql" } ], "test.test[sampling-system_sampling--Plan]": [ diff --git a/ydb/library/yql/tests/sql/yt_native_file/part7/canondata/result.json b/ydb/library/yql/tests/sql/yt_native_file/part7/canondata/result.json index 307545bd321..1a8b6c48caf 100644 --- a/ydb/library/yql/tests/sql/yt_native_file/part7/canondata/result.json +++ b/ydb/library/yql/tests/sql/yt_native_file/part7/canondata/result.json @@ -2338,20 +2338,6 @@ "uri": "https://{canondata_backend}/1946324/6707647cfa387ec829af2d598f1608a04da08a21/resource.tar.gz#test.test_produce-reduce_all_expr-default.txt-Results_/results.txt" } ], - "test.test[sampling-io_block_size_pragma--Debug]": [ - { - "checksum": "8aabd819e14ea1c4b3f60fe827652486", - "size": 4995, - "uri": "https://{canondata_backend}/1777230/1eefebeaa3ca9cd9cdd1b5dfe63e67427f585bf2/resource.tar.gz#test.test_sampling-io_block_size_pragma--Debug_/opt.yql" - } - ], - "test.test[sampling-io_block_size_pragma--Plan]": [ - { - "checksum": "730916bb057194448f8d9e0a47b31c96", - "size": 33258, - "uri": "https://{canondata_backend}/1871182/f4625d50a46161e5b24e60410bd7824808885254/resource.tar.gz#test.test_sampling-io_block_size_pragma--Plan_/plan.txt" - } - ], "test.test[sampling-map-dynamic-Debug]": [ { "checksum": "6e35a01959e3cee3ea0452b02387072f", |
