Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MLv2] [BE] Add breakoutColumn and aggregationColumn APIs to simply columns retrieval from these clauses #37120

Closed
Tracked by #36108
ranquild opened this issue Dec 27, 2023 · 0 comments · Fixed by #37873
Assignees
Labels
.Backend .metabase-lib Label for tracking all issues related to the shared CLJC metabase-lib .Team/QueryProcessor :hammer_and_wrench:
Milestone

Comments

@ranquild
Copy link
Contributor

ranquild commented Dec 27, 2023

// currently going from AggregationClause -> ColumnMetadata is non-trivial,
// so let's make a better API for this task
aggregationColumn(
  query: Query,
  stageIndex: number,
  clause: AggregationClause
): ColumnMetadata | null;

// same
breakoutColumn(
  query: Query,
  stageIndex: number,
  clause: BreakoutClause,
): ColumnMetadata
@ranquild ranquild added .metabase-lib Label for tracking all issues related to the shared CLJC metabase-lib .Team/QueryProcessor :hammer_and_wrench: .Backend labels Jan 8, 2024
@bshepherdson bshepherdson self-assigned this Jan 17, 2024
@bshepherdson bshepherdson added this to the 0.49 milestone Jan 17, 2024
bshepherdson added a commit that referenced this issue Jan 19, 2024
These are helpers for going from an aggregation or breakout
clause to the relevant `:metadata/column`. (Nil for top-level
aggregations like `:count`.)

Fixes #37120.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Backend .metabase-lib Label for tracking all issues related to the shared CLJC metabase-lib .Team/QueryProcessor :hammer_and_wrench:
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants