Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Measure type and AGGREGATE function (CALCITE-5105) introduced a configuration flag for naked measures.
Naked measures are measure-typed columns that are referenced outside an AGGREGATE() function call.
At Looker, we're trying to support a specific semantic using measure-typed columns:
- selecting from a naked measure-typed column outside an aggregating query evaluates to NULL
This permits basic introspection of the schema like `SELECT * FROM foo LIMIT 1`
For this, we need naked measures outside a grouping context. - selecting from a naked measure-typed column inside an aggregating query is an error
We want all expressions in a grouping query to either be part of the grouping key or to have
an aggregation function applied. For this, we don't want naked measures inside a grouping context.
This change proposes:
- nakedMeasuresOutsideAggregatingQuery - boolean flag permitting measure references outside aggregating query
- nakedMeasuresInsideAggregatingQuery - boolean flag permitting measure references inside aggregating query
- deprecating nakedMeasures flag, which is now implemented by setting both of the above to the same value
Attachments
Issue Links
- links to