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

Use appropriate variable name #994

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions metricflow/dataflow/builder/dataflow_plan_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,15 +698,15 @@ def _contains_multihop_linkables(linkable_specs: Sequence[LinkableInstanceSpec])
"""Returns true if any of the linkable specs requires a multi-hop join to realize."""
return any(len(x.entity_links) > 1 for x in linkable_specs)

def _get_semantic_model_names_for_measures(self, measure_names: Sequence[MeasureSpec]) -> Set[str]:
def _get_semantic_model_names_for_measures(self, measures: Sequence[MeasureSpec]) -> Set[str]:
"""Return the names of the semantic models needed to compute the input measures.

This is a temporary method for use in assertion boundaries while we implement support for multiple semantic models
"""
semantic_model_names: Set[str] = set()
for measure_name in measure_names:
for measure in measures:
semantic_model_names = semantic_model_names.union(
{d.name for d in self._semantic_model_lookup.get_semantic_models_for_measure(measure_name.reference)}
{d.name for d in self._semantic_model_lookup.get_semantic_models_for_measure(measure.reference)}
)
return semantic_model_names

Expand Down
Loading