aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/pg/aggr_compare.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/aggr_compare.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/aggr_compare.sql')
-rw-r--r--yql/essentials/tests/sql/suites/pg/aggr_compare.sql14
1 files changed, 14 insertions, 0 deletions
diff --git a/yql/essentials/tests/sql/suites/pg/aggr_compare.sql b/yql/essentials/tests/sql/suites/pg/aggr_compare.sql
new file mode 100644
index 0000000000..e041d4e61a
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/pg/aggr_compare.sql
@@ -0,0 +1,14 @@
+$n = Nothing(pgint4);
+$n2 = Nothing(pgint4) + 0p;
+$a = 1p;
+$b = 2p;
+$b2 = 1p + 1p;
+select
+ AsStruct(Yql::AggrLess($a, $b) as x1, Yql::AggrLess($b, $a) as x2, Yql::AggrLess($b, $b2) as x3,
+ Yql::AggrLess($a, $n) as y1, Yql::AggrLess($n, $a) as y2, Yql::AggrLess($n, $n2) as y3),
+ AsStruct(Yql::AggrLessOrEqual($a, $b) as x1, Yql::AggrLessOrEqual($b, $a) as x2, Yql::AggrLessOrEqual($b, $b2) as x3,
+ Yql::AggrLessOrEqual($a, $n) as y1, Yql::AggrLessOrEqual($n, $a) as y2, Yql::AggrLessOrEqual($n, $n2) as y3),
+ AsStruct(Yql::AggrGreater($a, $b) as x1, Yql::AggrGreater($b, $a) as x2, Yql::AggrGreater($b, $b2) as x3,
+ Yql::AggrGreater($a, $n) as y1, Yql::AggrGreater($n, $a) as y2, Yql::AggrGreater($n, $n2) as y3),
+ AsStruct(Yql::AggrGreaterOrEqual($a, $b) as x1, Yql::AggrGreaterOrEqual($b, $a) as x2, Yql::AggrGreaterOrEqual($b, $b2) as x3,
+ Yql::AggrGreaterOrEqual($a, $n) as y1, Yql::AggrGreaterOrEqual($n, $a) as y2, Yql::AggrGreaterOrEqual($n, $n2) as y3),