diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-11-20 11:14:58 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-11-20 11:14:58 +0000 |
commit | 31773f157bf8164364649b5f470f52dece0a4317 (patch) | |
tree | 33d0f7eef45303ab68cf08ab381ce5e5e36c5240 /yql/essentials/tests/sql/suites/ypath | |
parent | 2c7938962d8689e175574fc1e817c05049f27905 (diff) | |
parent | eff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff) | |
download | ydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz |
Merge branch 'rightlib' into mergelibs-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 |