Commit fcb560f
committed
Add support for
This change adds support for decrypting encrypted columns included in the
`GROUP BY` clause by using a new aggregate function, `cs_grouped_value_v1`.
How it works:
- An ORE term (either in an ORE or SteVec index) can be used in `GROUP BY`
- `cs_grouped_value_v1` can be used in the `SELECT` target list to return a
single source ciphertext for each group
- the ORE index is used for the equality check needed for grouping
- `cs_grouped_value_v1` allows for using the source ciphertext in the `SELECT`
target list (since `SELECT`ed items must either use an aggregrate function or
appear in the `GROUP BY`)
- note that including the source ciphertext in the `GROUP BY` statement wouldn't
work because source ciphertexts are non-deterministic and don't support
comparison operations (that's what ORE indexes are for)GROUP BY with cs_grouped_value_v1
1 parent 6347d80 commit fcb560f
2 files changed
+38
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
262 | 272 | | |
263 | 273 | | |
264 | 274 | | |
| |||
354 | 364 | | |
355 | 365 | | |
356 | 366 | | |
357 | | - | |
358 | 367 | | |
359 | 368 | | |
360 | 369 | | |
| |||
366 | 375 | | |
367 | 376 | | |
368 | 377 | | |
369 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
370 | 392 | | |
371 | 393 | | |
372 | 394 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
0 commit comments