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

Update get_semantic_models_for_measure to return just one semantic model #1136

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

courtneyholcomb
Copy link
Contributor

@courtneyholcomb courtneyholcomb commented Apr 15, 2024

Description

Measure names are required to be unique across semantic models, so we can safely assume that get_semantic_models_for_measure() should return one semantic model per measure.

Copy link
Contributor

@tlento tlento left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it, thanks!

Comment on lines 723 to 725
return {
self._semantic_model_lookup.get_semantic_model_for_measure(measure.reference).name for measure in measures
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind deleting this function and moving this one-liner over to where we call it? I think the docstring is super duper outdated and your change here removed all of the complexity from getting this set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

@courtneyholcomb courtneyholcomb enabled auto-merge (squash) April 15, 2024 19:57
@courtneyholcomb courtneyholcomb merged commit 8cc8eb7 into main Apr 15, 2024
13 checks passed
@courtneyholcomb courtneyholcomb deleted the court/clean branch April 15, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants