Skip to content

Commit b3b77ec

Browse files
committed
Add EXCLUSIVE UNION MAX, drop UNION MIN and EXCLUSIVE UNION ALL
1 parent 17ec5f8 commit b3b77ec

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

cip/1.accepted/CIP2017-04-20-query-combinators.adoc

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,14 @@ The most notable example of query combinators are _set operations_.
3131
This CIP proposes the introduction of several new multi-arm query combinators:
3232

3333
* `UNION`
34-
* `UNION MAX`
35-
* `UNION MIN`
3634
* `UNION ALL`
35+
* `UNION MAX`
3736
* `INTERSECT`
3837
* `INTERSECT ALL`
3938
* `EXCEPT`
4039
* `EXCEPT ALL`
4140
* `EXCLUSIVE UNION`
42-
* `EXCLUSIVE UNION ALL`
41+
* `EXCLUSIVE UNION MAX`
4342
* `OTHERWISE`
4443
* `CROSS`
4544
* `THEN`
@@ -65,12 +64,10 @@ If any arm specifies record fields explicitly, the same set of record fields in
6564

6665
`UNION` computes the logical set union between two sets of input records (i.e. any duplicates are discarded).
6766

68-
`UNION ALL` computes the logical multiset union between two bags of input records (i.e. all duplicates from both arms are retained).
67+
`UNION ALL` computes the logical multiset sum between two bags of input records (i.e. all duplicates from both arms are retained).
6968

7069
`UNION MAX` computes the logical max-bounded multiset union between two bags of input records (i.e. retains the largest number of duplicates from either arm).
7170

72-
`UNION MIN` computes the logical min-bounded multiset union between two bags of input records (i.e. retains the smallest, non-zero number of duplicates from either arm).
73-
7471

7572
=== INTERSECT
7673

@@ -88,7 +85,7 @@ If any arm specifies record fields explicitly, the same set of record fields in
8885

8986
`EXCLUSIVE UNION` computes the exclusive logical set union between two sets of input records (i.e. any duplicates in the final outcome are discarded).
9087

91-
`EXCLUSIVE UNION ALL` computes the exclusive logical multiset union between two bags of input records (i.e. the largest remaining excess multiplicity of each record in any argument bag is returned).
88+
`EXCLUSIVE UNION MAX` computes the exclusive logical multiset union between two bags of input records (i.e. the largest remaining excess multiplicity of each record in any argument bag is returned).
9289

9390
=== OTHERWISE
9491

@@ -129,11 +126,11 @@ This CIP adds `INTERSECT`, `EXCLUSIVE`, and `OTHERWISE` as new keywords.
129126

130127
=== Alternatives
131128

132-
`EXCLUSIVE UNION` is not provided by SQL and could be omitted.
129+
SQL does not provide `UNION MAX` (it has been suggested in the literature though).
133130

134-
`OTHERWISE` is not provided by SQL and could be omitted.
131+
`EXCLUSIVE UNION` and `EXCLUSIVE UNION MAX` are not provided by SQL and could be omitted.
135132

136-
SQL does not have `UNION MIN` or `UNION MAX` (it has been suggested in the literature though).
133+
`OTHERWISE` is not provided by SQL and could be omitted.
137134

138135
SQL allows `MINUS` as an alias for `EXCEPT`.
139136

0 commit comments

Comments
 (0)