Add dunder prefix to column aliases for simple-metric inputs#1938
Merged
Add dunder prefix to column aliases for simple-metric inputs#1938
Conversation
courtneyholcomb
approved these changes
Nov 13, 2025
Contributor
courtneyholcomb
left a comment
There was a problem hiding this comment.
That was a lot simpler than I expected! Thank you!
0f9bb9c to
6631e01
Compare
80fd912 to
f341cb8
Compare
plypaul
added a commit
that referenced
this pull request
Nov 17, 2025
Prior to the `measure -> simple metric` migration, aliases could be specified for measures (e.g. for input measures in a ratio metric) and for metrics (e.g. for input metrics in a derived metric). Post-migration, the code retained some of the prior behavior by replacing measures with a similar data structure called a simple-metric input. Aggregation of the simple-metric inputs was handled by `AggregateSimpleMetricInputsNode`, and it also handled renaming columns to handle manifest-configured aliases for simple metrics. The `ComputeMetricsNode` handled renaming columns for metric aliases. Since inputs to all metrics (aside from simple metrics) are other metrics now, renaming columns for aliases can be consolidated to the `ComputeMetricsNode`. This helps resolves some issues related to #1938. Due to the large snapshot changes, please view by commit.
6631e01 to
79e52f8
Compare
f341cb8 to
e04aa50
Compare
…lumn names of simple-metric inputs
e04aa50 to
66bfc2c
Compare
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.
To avoid alias conflicts in the generated SQL when a semantic model has a dimension and a simple metric with the same name, this PR updates the naming scheme for SQL column aliases. The longer term fix is to add a validation so that semantic models are required to have unique metric / measure / entity names.
Due to the large snapshot changes, please view by commit.