You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cip/1.accepted/CIP2017-04-20-query-combinators.adoc
+7-10Lines changed: 7 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,15 +31,14 @@ The most notable example of query combinators are _set operations_.
31
31
This CIP proposes the introduction of several new multi-arm query combinators:
32
32
33
33
* `UNION`
34
-
* `UNION MAX`
35
-
* `UNION MIN`
36
34
* `UNION ALL`
35
+
* `UNION MAX`
37
36
* `INTERSECT`
38
37
* `INTERSECT ALL`
39
38
* `EXCEPT`
40
39
* `EXCEPT ALL`
41
40
* `EXCLUSIVE UNION`
42
-
* `EXCLUSIVE UNION ALL`
41
+
* `EXCLUSIVE UNION MAX`
43
42
* `OTHERWISE`
44
43
* `CROSS`
45
44
* `THEN`
@@ -65,12 +64,10 @@ If any arm specifies record fields explicitly, the same set of record fields in
65
64
66
65
`UNION` computes the logical set union between two sets of input records (i.e. any duplicates are discarded).
67
66
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).
69
68
70
69
`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).
71
70
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
-
74
71
75
72
=== INTERSECT
76
73
@@ -88,7 +85,7 @@ If any arm specifies record fields explicitly, the same set of record fields in
88
85
89
86
`EXCLUSIVE UNION` computes the exclusive logical set union between two sets of input records (i.e. any duplicates in the final outcome are discarded).
90
87
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).
92
89
93
90
=== OTHERWISE
94
91
@@ -129,11 +126,11 @@ This CIP adds `INTERSECT`, `EXCLUSIVE`, and `OTHERWISE` as new keywords.
129
126
130
127
=== Alternatives
131
128
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).
133
130
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.
135
132
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.
0 commit comments