SQL capabilities for minimum aggregation and comparison controls
The following table lists the supported and unsupported SQL constructs and functions when a custom analysis rule uses minimum aggregation thresholds and comparison controls in the Spark analytics engine. Function categories follow the AWS Clean Rooms Spark SQL reference.
| Category | SQL construct | Supported | Common table expressions (CTEs) | Final SELECT clause |
|---|---|---|---|---|
| Query constructs |
|
Yes | Supported | Supported |
| Clauses |
|
Yes | Supported | Supported |
|
No | — | — | |
| Join clauses |
|
Yes | Supported | Supported |
|
No | — | — | |
| Set operators |
|
Yes | Supported | Supported |
|
No | — | — | |
| Sort and row limits |
|
Yes | Supported | Supported |
|
No | — | — | |
| Conditions |
|
Yes | Supported | Supported |
|
No | — | — | |
| Aggregate functions |
|
Yes | Supported |
When an aggregation threshold is set: MIN, MAX, PERCENTILE, APPROX_PERCENTILE, MEDIAN, COLLECT_LIST, and COLLECT_SET must be combined with a qualifying aggregation (AVG, COUNT, SUM). They cannot be used as a standalone aggregation. When only comparison controls are set: no such restriction. All other aggregate functions are supported. |
|
No | — | — | |
| Array functions |
|
Yes | Supported | Supported |
|
No | — | — | |
| Conditional expressions |
|
Yes | Supported | Supported |
| Constructor functions |
|
Yes | Supported | Supported |
| Data type formatting functions |
|
Yes | Supported | Supported |
|
No | — | — | |
| Date and time functions |
|
Yes | Supported | Supported |
|
No | — | — | |
| Hash functions |
|
Yes | Supported | Supported |
| JSON functions |
|
Yes | Supported | Supported |
| Math functions |
|
Yes | Supported | Supported |
|
No | — | — | |
| Mathematical operator symbols |
|
Yes | Supported | Supported |
| Scalar functions |
|
Yes | Supported | Supported |
| String functions |
|
Yes | Supported | Supported |
|
No | — | — | |
| Privacy-related functions |
|
Yes | Supported | Supported |
| Window functions |
|
Yes | Supported |
When an aggregation threshold is set: LAG, LEAD, Window MIN, Window MAX, Window APPROX_PERCENTILE, and Window PERCENTILE must be combined with a qualifying aggregation. They cannot be used as a standalone value. When only comparison controls are set: no such restriction. All other window functions are supported. |
|
No | — | — | |
| Encryption and decryption functions |
|
No | — | — |
| Hyperloglog functions |
|
No | — | — |