diff options
author | Maxim Yurchuk <maxim-yurchuk@ydb.tech> | 2024-11-20 17:37:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-20 17:37:57 +0000 |
commit | f76323e9b295c15751e51e3443aa47a36bee8023 (patch) | |
tree | 4113c8cad473a33e0f746966e0cf087252fa1d7a /yql/essentials/tests/sql/suites/epochs | |
parent | 753ecb8d410a4cb459c26f3a0082fb2d1724fe63 (diff) | |
parent | a7b9a6afea2a9d7a7bfac4c5eb4c1a8e60adb9e6 (diff) | |
download | ydb-f76323e9b295c15751e51e3443aa47a36bee8023.tar.gz |
Merge pull request #11788 from ydb-platform/mergelibs-241120-1113
Library import 241120-1113
Diffstat (limited to 'yql/essentials/tests/sql/suites/epochs')
12 files changed, 93 insertions, 0 deletions
diff --git a/yql/essentials/tests/sql/suites/epochs/default.cfg b/yql/essentials/tests/sql/suites/epochs/default.cfg new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/epochs/default.cfg diff --git a/yql/essentials/tests/sql/suites/epochs/input.txt b/yql/essentials/tests/sql/suites/epochs/input.txt new file mode 100644 index 0000000000..65949ea745 --- /dev/null +++ b/yql/essentials/tests/sql/suites/epochs/input.txt @@ -0,0 +1,4 @@ +{"key"="075";"subkey"="1";"value"="abc"}; +{"key"="800";"subkey"="2";"value"="ddd"}; +{"key"="020";"subkey"="3";"value"="q"}; +{"key"="150";"subkey"="4";"value"="qzz"}; diff --git a/yql/essentials/tests/sql/suites/epochs/modify.txt b/yql/essentials/tests/sql/suites/epochs/modify.txt new file mode 100644 index 0000000000..15f63a38a7 --- /dev/null +++ b/yql/essentials/tests/sql/suites/epochs/modify.txt @@ -0,0 +1,2 @@ +{"key"="023";"subkey"="3";"value"="aaa"}; +{"key"="037";"subkey"="5";"value"="ddd"}; diff --git a/yql/essentials/tests/sql/suites/epochs/modify.txt.attr b/yql/essentials/tests/sql/suites/epochs/modify.txt.attr new file mode 100644 index 0000000000..36b3c00c90 --- /dev/null +++ b/yql/essentials/tests/sql/suites/epochs/modify.txt.attr @@ -0,0 +1,5 @@ +{ + "_yql_row_spec"={ + "Type"=["StructType";[["key";["DataType";"String";];];["subkey";["DataType";"String";];];["value";["DataType";"String";];];];]; + } +} diff --git a/yql/essentials/tests/sql/suites/epochs/read_modified.cfg b/yql/essentials/tests/sql/suites/epochs/read_modified.cfg new file mode 100644 index 0000000000..91ba34f663 --- /dev/null +++ b/yql/essentials/tests/sql/suites/epochs/read_modified.cfg @@ -0,0 +1,2 @@ +out Output modify.txt +res result.txt diff --git a/yql/essentials/tests/sql/suites/epochs/read_modified.sql b/yql/essentials/tests/sql/suites/epochs/read_modified.sql new file mode 100644 index 0000000000..b30996c785 --- /dev/null +++ b/yql/essentials/tests/sql/suites/epochs/read_modified.sql @@ -0,0 +1,17 @@ +/* postgres can not */ +/* multirun can not */ +use plato; + +insert into Output select * from Output; +insert into Output select * from Output; + +commit; + +select count(*) from Output; + +insert into Output select * from Output; +insert into Output select * from Output; + +commit; + +select count(*) from Output; diff --git a/yql/essentials/tests/sql/suites/epochs/reset_sortness_on_append.cfg b/yql/essentials/tests/sql/suites/epochs/reset_sortness_on_append.cfg new file mode 100644 index 0000000000..7cbf80703f --- /dev/null +++ b/yql/essentials/tests/sql/suites/epochs/reset_sortness_on_append.cfg @@ -0,0 +1,2 @@ +out Output output.txt +res result.txt diff --git a/yql/essentials/tests/sql/suites/epochs/reset_sortness_on_append.sql b/yql/essentials/tests/sql/suites/epochs/reset_sortness_on_append.sql new file mode 100644 index 0000000000..8127e25a0a --- /dev/null +++ b/yql/essentials/tests/sql/suites/epochs/reset_sortness_on_append.sql @@ -0,0 +1,18 @@ +/* postgres can not */ +/* multirun can not */ +use plato; + +insert into Output with truncate (a, b) values +('00', '10'), +('11', '20'), +('21', '30'), +('31', '40'), +('41', '50'); + +commit; + +insert into Output select * from Output order by a; + +commit; + +select * from Output where a > '11' diff --git a/yql/essentials/tests/sql/suites/epochs/use_and_drop_anonymous.cfg b/yql/essentials/tests/sql/suites/epochs/use_and_drop_anonymous.cfg new file mode 100644 index 0000000000..2e3eaf9682 --- /dev/null +++ b/yql/essentials/tests/sql/suites/epochs/use_and_drop_anonymous.cfg @@ -0,0 +1,4 @@ +in Input input.txt +out Output output.txt +providers yt + diff --git a/yql/essentials/tests/sql/suites/epochs/use_and_drop_anonymous.sql b/yql/essentials/tests/sql/suites/epochs/use_and_drop_anonymous.sql new file mode 100644 index 0000000000..ee5c907dc9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/epochs/use_and_drop_anonymous.sql @@ -0,0 +1,21 @@ +/* postgres can not */ +/* multirun can not */ +use plato; + +insert into @tmp select * from Input where key > "100"; +commit; + +insert into Output +select * from @tmp where key != "150"; + +drop table @tmp; +commit; + +insert into @tmp select * from Input where key > "200"; +commit; + +insert into Output +select * from @tmp where key != "150"; + +drop table @tmp; +commit; diff --git a/yql/essentials/tests/sql/suites/epochs/use_sorted_by_complex_type.cfg b/yql/essentials/tests/sql/suites/epochs/use_sorted_by_complex_type.cfg new file mode 100644 index 0000000000..fe2b19a9ff --- /dev/null +++ b/yql/essentials/tests/sql/suites/epochs/use_sorted_by_complex_type.cfg @@ -0,0 +1,3 @@ +in Input input.txt +out Output output.txt +res result.txt diff --git a/yql/essentials/tests/sql/suites/epochs/use_sorted_by_complex_type.sql b/yql/essentials/tests/sql/suites/epochs/use_sorted_by_complex_type.sql new file mode 100644 index 0000000000..28c1f2e062 --- /dev/null +++ b/yql/essentials/tests/sql/suites/epochs/use_sorted_by_complex_type.sql @@ -0,0 +1,15 @@ +/* postgres can not */ +/* multirun can not */ +USE plato; + +insert into Output +select + key as key, + aggr_list(subkey) as lst +from Input +group by key +order by key, lst; + +commit; + +select * from Output where key > "150";
\ No newline at end of file |