Skip to content

Commit 3e82074

Browse files
authored
Merge pull request #126 from cipherstash/fix/delegate-max-min-to-compare
fix: make min & max delegate to comparison ops directly
2 parents 76f26c0 + ec108d7 commit 3e82074

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/encrypted/aggregates.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CREATE FUNCTION eql_v2.min(a eql_v2_encrypted, b eql_v2_encrypted)
99
STRICT
1010
AS $$
1111
BEGIN
12-
IF eql_v2.ore_block_u64_8_256(a) < eql_v2.ore_block_u64_8_256(b) THEN
12+
IF a < b THEN
1313
RETURN a;
1414
ELSE
1515
RETURN b;
@@ -30,7 +30,7 @@ RETURNS eql_v2_encrypted
3030
STRICT
3131
AS $$
3232
BEGIN
33-
IF eql_v2.ore_block_u64_8_256(a) > eql_v2.ore_block_u64_8_256(b) THEN
33+
IF a > b THEN
3434
RETURN a;
3535
ELSE
3636
RETURN b;

src/operators/order_by.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
-- REQUIRE: src/ore_block_u64_8_256/operators.sql
55
-- REQUIRE: src/ore_cllw_u64_8/types.sql
66
-- REQUIRE: src/ore_cllw_u64_8/functions.sql
7-
-- REQUIRE: src/ore_cllw_u64_8/operators.sql
87

98
-- order_by function for ordering when operators are not available.
109
--

0 commit comments

Comments
 (0)