aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/pg/select_case.sql
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/pg/select_case.sql
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/pg/select_case.sql')
-rw-r--r--yql/essentials/tests/sql/suites/pg/select_case.sql20
1 files changed, 20 insertions, 0 deletions
diff --git a/yql/essentials/tests/sql/suites/pg/select_case.sql b/yql/essentials/tests/sql/suites/pg/select_case.sql
new file mode 100644
index 0000000000..67ba959fa8
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/pg/select_case.sql
@@ -0,0 +1,20 @@
+--!syntax_pg
+
+select
+-- case $x when
+case 2 when 1 then 777 else 999 end a1,
+case 1 when 1 then 777 else 999 end a2,
+case 1 when 1 then 3 end a3,
+case 1 when 2 then 3 end a4,
+case 1 when 2 then 3 else 4 end a5,
+case 1 when 2 then 20 when 3 then 30 when 4 then 40 when 5 then 50 when 6 then 60 when 7 then 70 else 100 end a6,
+case 1 when 2 then 20 when 3 then 30 when 4 then 40 when 5 then 50 when 6 then 60 when 7 then 70 end a7,
+
+-- case when
+case when 2=1 then 777 else 999 end b1,
+case when 1=1 then 777 else 999 end b2,
+case when 1=1 then 3 end b3,
+case when 1=2 then 3 end b4,
+case when 1=2 then 3 else 4 end b5,
+case when 1=2 then 20 when 1=3 then 30 when 1=4 then 40 when 1=5 then 50 when 1=6 then 60 when 1=7 then 70 else 100 end b6,
+case when 1=2 then 20 when 1=3 then 30 when 1=4 then 40 when 1=5 then 50 when 1=6 then 60 when 1=7 then 70 end b7