aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/ansi_idents
diff options
context:
space:
mode:
authorMaxim Yurchuk <maxim-yurchuk@ydb.tech>2024-11-20 17:37:57 +0000
committerGitHub <noreply@github.com>2024-11-20 17:37:57 +0000
commitf76323e9b295c15751e51e3443aa47a36bee8023 (patch)
tree4113c8cad473a33e0f746966e0cf087252fa1d7a /yql/essentials/tests/sql/suites/ansi_idents
parent753ecb8d410a4cb459c26f3a0082fb2d1724fe63 (diff)
parenta7b9a6afea2a9d7a7bfac4c5eb4c1a8e60adb9e6 (diff)
downloadydb-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/ansi_idents')
-rw-r--r--yql/essentials/tests/sql/suites/ansi_idents/basic_columns.sql5
-rw-r--r--yql/essentials/tests/sql/suites/ansi_idents/default.cfg4
-rw-r--r--yql/essentials/tests/sql/suites/ansi_idents/escaped_udf_name.sql6
-rw-r--r--yql/essentials/tests/sql/suites/ansi_idents/escaping.sql3
-rw-r--r--yql/essentials/tests/sql/suites/ansi_idents/inplace_yql.sql8
-rw-r--r--yql/essentials/tests/sql/suites/ansi_idents/input.txt4
-rw-r--r--yql/essentials/tests/sql/suites/ansi_idents/input2.txt4
-rw-r--r--yql/essentials/tests/sql/suites/ansi_idents/input3.txt7
-rw-r--r--yql/essentials/tests/sql/suites/ansi_idents/input4.txt9
-rw-r--r--yql/essentials/tests/sql/suites/ansi_idents/join_using.sql5
-rw-r--r--yql/essentials/tests/sql/suites/ansi_idents/order_by.sql5
-rw-r--r--yql/essentials/tests/sql/suites/ansi_idents/string_escaping.sql3
-rw-r--r--yql/essentials/tests/sql/suites/ansi_idents/struct_access.sql5
13 files changed, 68 insertions, 0 deletions
diff --git a/yql/essentials/tests/sql/suites/ansi_idents/basic_columns.sql b/yql/essentials/tests/sql/suites/ansi_idents/basic_columns.sql
new file mode 100644
index 0000000000..6bce49176a
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/ansi_idents/basic_columns.sql
@@ -0,0 +1,5 @@
+--!ansi_lexer
+/* syntax version 1 */
+use plato;
+
+select "key" || subkey as "akey" from Input order by akey;
diff --git a/yql/essentials/tests/sql/suites/ansi_idents/default.cfg b/yql/essentials/tests/sql/suites/ansi_idents/default.cfg
new file mode 100644
index 0000000000..a1f7a5a9b7
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/ansi_idents/default.cfg
@@ -0,0 +1,4 @@
+in Input input.txt
+in Input2 input2.txt
+in Input3 input3.txt
+in Input4 input4.txt
diff --git a/yql/essentials/tests/sql/suites/ansi_idents/escaped_udf_name.sql b/yql/essentials/tests/sql/suites/ansi_idents/escaped_udf_name.sql
new file mode 100644
index 0000000000..9316d67556
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/ansi_idents/escaped_udf_name.sql
@@ -0,0 +1,6 @@
+--!ansi_lexer
+/* syntax version 1 */
+/* postgres can not */
+use plato;
+
+select `key` from Input where "String"::Contains("key", '7') order by key;
diff --git a/yql/essentials/tests/sql/suites/ansi_idents/escaping.sql b/yql/essentials/tests/sql/suites/ansi_idents/escaping.sql
new file mode 100644
index 0000000000..bb73b46d5f
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/ansi_idents/escaping.sql
@@ -0,0 +1,3 @@
+--!ansi_lexer
+/* syntax version 1 */
+select 1 as "\", 2 as "foo""bar", 3 as """baz";
diff --git a/yql/essentials/tests/sql/suites/ansi_idents/inplace_yql.sql b/yql/essentials/tests/sql/suites/ansi_idents/inplace_yql.sql
new file mode 100644
index 0000000000..d851d9f6f7
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/ansi_idents/inplace_yql.sql
@@ -0,0 +1,8 @@
+--!ansi_lexer
+/* syntax version 1 */
+/* postgres can not */
+pragma warning("disable", "4510");
+
+$foo = "YQL"::'(lambda ''(item) (Concat (String ''"foo\''") item))';
+
+select $foo('bar');
diff --git a/yql/essentials/tests/sql/suites/ansi_idents/input.txt b/yql/essentials/tests/sql/suites/ansi_idents/input.txt
new file mode 100644
index 0000000000..65949ea745
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/ansi_idents/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/ansi_idents/input2.txt b/yql/essentials/tests/sql/suites/ansi_idents/input2.txt
new file mode 100644
index 0000000000..5c939cf453
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/ansi_idents/input2.txt
@@ -0,0 +1,4 @@
+{"key"="1";"subkey"="10";"value"="FOO"};
+{"key"="1";"subkey"="20";"value"="BAR"};
+{"key"="1";"subkey"="30";"value"="BAR"};
+{"key"="0";"subkey"="40";"value"="FOO"};
diff --git a/yql/essentials/tests/sql/suites/ansi_idents/input3.txt b/yql/essentials/tests/sql/suites/ansi_idents/input3.txt
new file mode 100644
index 0000000000..48d828f6fd
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/ansi_idents/input3.txt
@@ -0,0 +1,7 @@
+{"key"="1";"subkey"="10";"value"="FOO"};
+{"key"="1";"subkey"="20";"value"="BAR"};
+{"key"="1";"subkey"="30";"value"="BAR"};
+{"key"="0";"subkey"="40";"value"="FOO"};
+{"key"="0";"subkey"="40";"value"="FOO"};
+{"key"="A";"subkey"="50";"value"="WAT"};
+{"key"="A";"subkey"="50";"value"="WAT"};
diff --git a/yql/essentials/tests/sql/suites/ansi_idents/input4.txt b/yql/essentials/tests/sql/suites/ansi_idents/input4.txt
new file mode 100644
index 0000000000..65f33616b2
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/ansi_idents/input4.txt
@@ -0,0 +1,9 @@
+{"key"="0";"subkey"="10";"value"="FOO"};
+{"key"="0";"subkey"="40";"value"="FOO"};
+{"key"="1";"subkey"="10";"value"="FOO"};
+{"key"="1";"subkey"="20";"value"="BAR"};
+{"key"="1";"subkey"="40";"value"="BAR"};
+{"key"="1";"subkey"="50";"value"="WAT"};
+{"key"="2";"subkey"="40";"value"="WAT"};
+{"key"="2";"subkey"="50";"value"="FOO"};
+{"key"="2";"subkey"="60";"value"="BAR"};
diff --git a/yql/essentials/tests/sql/suites/ansi_idents/join_using.sql b/yql/essentials/tests/sql/suites/ansi_idents/join_using.sql
new file mode 100644
index 0000000000..9f2c9c1869
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/ansi_idents/join_using.sql
@@ -0,0 +1,5 @@
+--!ansi_lexer
+/* syntax version 1 */
+use plato;
+
+select count(*) from Input2 as a join Input3 as b using("key");;
diff --git a/yql/essentials/tests/sql/suites/ansi_idents/order_by.sql b/yql/essentials/tests/sql/suites/ansi_idents/order_by.sql
new file mode 100644
index 0000000000..ca319759aa
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/ansi_idents/order_by.sql
@@ -0,0 +1,5 @@
+--!ansi_lexer
+/* syntax version 1 */
+use plato;
+
+select "a".* from Input as "a" order by "key", `subkey`;
diff --git a/yql/essentials/tests/sql/suites/ansi_idents/string_escaping.sql b/yql/essentials/tests/sql/suites/ansi_idents/string_escaping.sql
new file mode 100644
index 0000000000..cd234de71c
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/ansi_idents/string_escaping.sql
@@ -0,0 +1,3 @@
+--!ansi_lexer
+/* syntax version 1 */
+select '\', '', 'foo''bar', '''baz';
diff --git a/yql/essentials/tests/sql/suites/ansi_idents/struct_access.sql b/yql/essentials/tests/sql/suites/ansi_idents/struct_access.sql
new file mode 100644
index 0000000000..034a9dd2a3
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/ansi_idents/struct_access.sql
@@ -0,0 +1,5 @@
+--!ansi_lexer
+/* syntax version 1 */
+/* postgres can not */
+$s = <|"a": 1, b: 2, `c`: 3|>;
+select $s."b";