diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java index d7dd4e7da624..bbb6202aba72 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java @@ -1405,6 +1405,11 @@ default Optional> applyAggreg Map assignments, List> groupingSets) { + // Global aggregation is represented by [[]] + if (groupingSets.isEmpty()) { + throw new IllegalArgumentException("No grouping sets provided"); + } + return Optional.empty(); }