aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/pg/select_case.sql
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-11-20 11:14:58 +0000
committerAlexander Smirnov <alex@ydb.tech>2024-11-20 11:14:58 +0000
commit31773f157bf8164364649b5f470f52dece0a4317 (patch)
tree33d0f7eef45303ab68cf08ab381ce5e5e36c5240 /yql/essentials/tests/sql/suites/pg/select_case.sql
parent2c7938962d8689e175574fc1e817c05049f27905 (diff)
parenteff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff)
downloadydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz
Merge branch 'rightlib' into mergelibs-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