You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Tanner Clary (Jira)" <ji...@apache.org> on 2024/03/24 18:44:00 UTC

[jira] [Resolved] (CALCITE-6337) Distinguish naked measure support between inside and outside aggregation

     [ https://issues.apache.org/jira/browse/CALCITE-6337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tanner Clary resolved CALCITE-6337.
-----------------------------------
    Fix Version/s: 1.37.0
       Resolution: Fixed

Merged via [14ade3a|https://github.com/apache/calcite/commit/14ade3a72032986731239068963e4716dc7fe6af], thanks for the fix, [~barrkel], and the review, [~julianhyde]!

It's not letting me assign [~barrkel] so if someone else is able to that'd be great

> Distinguish naked measure support between inside and outside aggregation
> ------------------------------------------------------------------------
>
>                 Key: CALCITE-6337
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6337
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Barry Kelly
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.37.0
>
>
> 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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)