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/ypath | |
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/ypath')
15 files changed, 94 insertions, 0 deletions
diff --git a/yql/essentials/tests/sql/suites/ypath/complex.sql b/yql/essentials/tests/sql/suites/ypath/complex.sql new file mode 100644 index 0000000000..8c8ec6cba9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/complex.sql @@ -0,0 +1,3 @@ +/* syntax version 1 */ +/* postgres can not */ +SELECT * FROM plato.`Input[#0:#2,"075",#7:#9,("150","2"):("150","5")]`; diff --git a/yql/essentials/tests/sql/suites/ypath/default.cfg b/yql/essentials/tests/sql/suites/ypath/default.cfg new file mode 100644 index 0000000000..6f99339756 --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/default.cfg @@ -0,0 +1,2 @@ +in Input input.txt +res result.txt diff --git a/yql/essentials/tests/sql/suites/ypath/direct_read_from_dynamic.cfg b/yql/essentials/tests/sql/suites/ypath/direct_read_from_dynamic.cfg new file mode 100644 index 0000000000..1908d503d1 --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/direct_read_from_dynamic.cfg @@ -0,0 +1,2 @@ +in Input dynamic.txt +res result.txt diff --git a/yql/essentials/tests/sql/suites/ypath/direct_read_from_dynamic.sql b/yql/essentials/tests/sql/suites/ypath/direct_read_from_dynamic.sql new file mode 100644 index 0000000000..1f9f690313 --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/direct_read_from_dynamic.sql @@ -0,0 +1,4 @@ +/* syntax version 1 */ +/* postgres can not */ +pragma direct_read; +SELECT * FROM plato.`Input["150"]`; diff --git a/yql/essentials/tests/sql/suites/ypath/dynamic.txt b/yql/essentials/tests/sql/suites/ypath/dynamic.txt new file mode 100644 index 0000000000..c2f900fd7c --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/dynamic.txt @@ -0,0 +1,7 @@ +{"key"="020";"subkey"="1";"value"="q"}; +{"key"="075";"subkey"="2";"value"="abc"}; +{"key"="075";"subkey"="3";"value"="abc"}; +{"key"="075";"subkey"="4";"value"="abc"}; +{"key"="075";"subkey"="5";"value"="abc"}; +{"key"="150";"subkey"="6";"value"="qzz"}; +{"key"="800";"subkey"="7";"value"="ddd"}; diff --git a/yql/essentials/tests/sql/suites/ypath/dynamic.txt.attr b/yql/essentials/tests/sql/suites/ypath/dynamic.txt.attr new file mode 100644 index 0000000000..9e3c33c4cb --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/dynamic.txt.attr @@ -0,0 +1,33 @@ +{ + "_yql_row_spec"={ + "Type"=["StructType";[ + ["key"; ["DataType"; "String"]]; + ["subkey"; ["DataType"; "String"]]; + ["value"; ["DataType"; "String"]]; + ]]; + "SortMembers"=["key"; "subkey"]; + "SortedBy"=["key"; "subkey"]; + "SortDirections"=[1; 1]; + "SortedByTypes"=[["DataType";"String"]; ["DataType";"String"]] + }; + "_yql_dynamic"=%true; + "schema"=< + "strict" = %true; + "unique_keys" = %true + >[ + { + "name" = "key"; + "type" = "string"; + "sort_order" = "ascending"; + }; + { + "name" = "subkey"; + "type" = "string"; + "sort_order" = "ascending"; + }; + { + "name" = "value"; + "type" = "string"; + }; + ] +}
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/ypath/empty_range-dynamic.cfg b/yql/essentials/tests/sql/suites/ypath/empty_range-dynamic.cfg new file mode 100644 index 0000000000..a35dbb3169 --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/empty_range-dynamic.cfg @@ -0,0 +1,3 @@ +in Input dynamic.txt +res result.txt +providers yt diff --git a/yql/essentials/tests/sql/suites/ypath/empty_range.cfg b/yql/essentials/tests/sql/suites/ypath/empty_range.cfg new file mode 100644 index 0000000000..2c31ed76e1 --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/empty_range.cfg @@ -0,0 +1,3 @@ +in Input input.txt +res result.txt +providers yt diff --git a/yql/essentials/tests/sql/suites/ypath/empty_range.sql b/yql/essentials/tests/sql/suites/ypath/empty_range.sql new file mode 100644 index 0000000000..397ed970db --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/empty_range.sql @@ -0,0 +1,2 @@ +/*ytfile can not*/ +SELECT * FROM plato.`<ranges=[]>//Input`; diff --git a/yql/essentials/tests/sql/suites/ypath/input.txt b/yql/essentials/tests/sql/suites/ypath/input.txt new file mode 100644 index 0000000000..b214aab0d9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/input.txt @@ -0,0 +1,10 @@ +{"key"="023";"subkey"="3";"value"="aaa"}; +{"key"="037";"subkey"="5";"value"="ddd"}; +{"key"="075";"subkey"="1";"value"="abc"}; +{"key"="150";"subkey"="1";"value"="aaa"}; +{"key"="150";"subkey"="3";"value"="iii"}; +{"key"="150";"subkey"="8";"value"="zzz"}; +{"key"="200";"subkey"="7";"value"="qqq"}; +{"key"="527";"subkey"="4";"value"="bbb"}; +{"key"="761";"subkey"="6";"value"="ccc"}; +{"key"="911";"subkey"="2";"value"="kkk"}; diff --git a/yql/essentials/tests/sql/suites/ypath/input.txt.attr b/yql/essentials/tests/sql/suites/ypath/input.txt.attr new file mode 100644 index 0000000000..7a11b85b77 --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/input.txt.attr @@ -0,0 +1,13 @@ +{ + "_yql_row_spec"={ + "Type"=["StructType";[ + ["key"; ["DataType"; "String"]]; + ["subkey"; ["DataType"; "String"]]; + ["value"; ["DataType"; "String"]]; + ]]; + "SortMembers"=["key"; "subkey"]; + "SortedBy"=["key"; "subkey"]; + "SortDirections"=[1; 1]; + "SortedByTypes"=[["DataType";"String"]; ["DataType";"String"]] + }; +} diff --git a/yql/essentials/tests/sql/suites/ypath/limit_with_key.sql b/yql/essentials/tests/sql/suites/ypath/limit_with_key.sql new file mode 100644 index 0000000000..7d0b726842 --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/limit_with_key.sql @@ -0,0 +1,3 @@ +/* syntax version 1 */ +/* postgres can not */ +SELECT * FROM plato.`Input["150"]` LIMIT 2; diff --git a/yql/essentials/tests/sql/suites/ypath/limit_with_range.sql b/yql/essentials/tests/sql/suites/ypath/limit_with_range.sql new file mode 100644 index 0000000000..7739be5c32 --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/limit_with_range.sql @@ -0,0 +1,3 @@ +/* syntax version 1 */ +/* postgres can not */ +SELECT * FROM plato.`Input[#1:#4]` LIMIT 2; diff --git a/yql/essentials/tests/sql/suites/ypath/multi_key.sql b/yql/essentials/tests/sql/suites/ypath/multi_key.sql new file mode 100644 index 0000000000..ccc77294e8 --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/multi_key.sql @@ -0,0 +1,3 @@ +/* syntax version 1 */ +/* postgres can not */ +SELECT * FROM plato.`Input[("150","2"):("150","5"),"075"]`; diff --git a/yql/essentials/tests/sql/suites/ypath/multi_range.sql b/yql/essentials/tests/sql/suites/ypath/multi_range.sql new file mode 100644 index 0000000000..ecdc211aea --- /dev/null +++ b/yql/essentials/tests/sql/suites/ypath/multi_range.sql @@ -0,0 +1,3 @@ +/* syntax version 1 */ +/* postgres can not */ +SELECT * FROM plato.`Input[#0:#2,#4:#7]`;
\ No newline at end of file |