Repository navigation
docs(core-spec): Reserve AGG() in Ossie SQL - #662
Merged
Merged
Conversation
Reserve the function name AGG for measure evaluation, as defined by the Relational Query Interface, and add a compatibility note for older expressions that call a different function named AGG. State that function names should be case insensitive, like regular identifiers. Where model declarations may use AGG is left to a future version. Co-authored-by: Isaac <no-reply@databricks.com>
jbonofre
previously approved these changes
Nov 1, 2026
jbonofre
left a comment
Member
There was a problem hiding this comment.
Thanks @justint-db, this matches what we agreed on the dev@ mailing list (split from #633 ):
AGGis reserved in Ossie SQL, with a compatibility note for existing expressions calling another function namedAGG- function names are case insensitive, so
agg()andAgg()are covered too - function names and identifiers are separate namespaces, so a field or metric named
aggstill works - where model declarations can use
AGG(dataset scoped metric,AGGover a source measure) stays in #633
A few non-blocking points we can address later:
- The compatibility note suggests moving an older
AGGcall to a vendor dialect, but the new section says a dialect extension MUST NOT defineAGG. As vendor dialects are opaque (spec.md), I think the reservation should apply toOSSIE_SQL_2026expression only. - It would be good to say explicitly that
AGG(...)is not allowed inOSSIE_SQL_2026model expressions until a future version defines where it can be used (maybe in the "Not Supported in Expressions" table). - Functions callable without parentheses (
CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP) can collide with a field of the same name. Worth an exception in the "separate namespaces" sentence.
Limit the reservation to OSSIE_SQL_2026 expressions, since vendor dialects are opaque, and state that OSSIE_SQL_2026 expressions must not call AGG until a future version defines where it may be used. List it under Not Supported in Expressions. Drop the general claim that function names and identifiers are separate namespaces, which has exceptions this change does not need to define. The compatibility note keeps the narrower claim that a field, metric, or column may still be named agg. Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
Author
|
Thanks @jbonofre! I've addressed all three in 5a953a5:
|
christianeu-db
approved these changes
Nov 3, 2026
christianeu-db
left a comment
Contributor
There was a problem hiding this comment.
Thread on AGG() has been open for a week w/ lazy consensus
ekut
added a commit
to Dactopus/dactopus-ossie-clickhouse
that referenced
this pull request
Nov 6, 2026
A dataset's metric may read a column of its source as source.column (apache/ossie#633). The qualifier is case insensitive, the column wins over a field of the same name, and a dataset that declares a field named source refuses the qualifier. validate --url checks the column, and a metric over a column the connected user cannot read is hidden. A call of AGG in any capitalization is refused in fields, metrics and filters, as the spec reserves the name (apache/ossie#662). ANSI_SQL entries are read by the same rule. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
6 tasks done
ekut
added a commit
to Dactopus/dactopus-ossie-clickhouse
that referenced
this pull request
Nov 7, 2026
A dataset's metric may read a column of its source as source.column (apache/ossie#633). The qualifier is case insensitive, the column wins over a field of the same name, and a dataset that declares a field named source refuses the qualifier. validate --url checks the column, and a metric over a column the connected user cannot read is hidden. A call of AGG in any capitalization is refused in fields, metrics and filters, as the spec reserves the name (apache/ossie#662). ANSI_SQL entries are read by the same rule. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AGG. Ossie SQL reserves the function nameAGGfor evaluating a measure, as defined by the Relational Query Interface (Sections 4 and 6). Implementations and dialect extensions must not give it another meaning. This change reserves the name only. Where model declarations may useAGGis left to a future version (docs(core-spec): Let dataset-scoped metrics reference source columns as source.column #633 proposes one use).AGG, so an olderOSSIE_SQL_2026expression might call a different function by that name. Fields, metrics, and columns can still be namedagg.Only
core-spec/expression_language.mdchanges.Related Issues
Split from #633.
Checklist
Specification
core-spec/and follow the existing structure