Skip to content

Commit

Permalink
Remove unneeded changes
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Sep 22, 2023
1 parent 8067f24 commit 2074663
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 25 deletions.
5 changes: 1 addition & 4 deletions metricflow/dataflow/builder/dataflow_plan_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ class DataflowPlanBuilder:
def __init__( # noqa: D
self,
source_nodes: Sequence[BaseOutput],
source_nodes_without_measures: Sequence[BaseOutput],
semantic_manifest_lookup: SemanticManifestLookup,
cost_function: DataflowPlanNodeCostFunction = DefaultCostFunction(),
node_output_resolver: Optional[DataflowPlanNodeOutputDataSetResolver] = None,
Expand All @@ -127,7 +126,6 @@ def __init__( # noqa: D
self._metric_time_dimension_reference = DataSet.metric_time_dimension_reference()
self._cost_function = cost_function
self._source_nodes = source_nodes
self._source_nodes_without_measures = source_nodes_without_measures
self._column_association_resolver = (
DunderColumnAssociationResolver(semantic_manifest_lookup)
if not column_association_resolver
Expand Down Expand Up @@ -457,13 +455,12 @@ def _find_dataflow_recipe(
time_range_constraint: Optional[TimeRangeConstraint] = None,
) -> Optional[DataflowRecipe]:
linkable_specs = linkable_spec_set.as_tuple
source_nodes = self._source_nodes
if measure_spec_properties:
source_nodes = self._source_nodes
potential_source_nodes: Sequence[BaseOutput] = self._select_source_nodes_with_measures(
measure_specs=set(measure_spec_properties.measure_specs), source_nodes=source_nodes
)
else:
source_nodes = self._source_nodes_without_measures
potential_source_nodes = self._select_source_nodes_with_linkable_specs(
linkable_specs=linkable_spec_set, source_nodes=source_nodes
)
Expand Down
4 changes: 0 additions & 4 deletions metricflow/engine/metricflow_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,6 @@ def __init__(

source_node_builder = SourceNodeBuilder(self._semantic_manifest_lookup)
source_nodes = source_node_builder.create_from_data_sets(self._source_data_sets)
source_nodes_without_measures = source_node_builder.create_from_data_sets(
self._source_data_sets, with_measures=False
)

node_output_resolver = DataflowPlanNodeOutputDataSetResolver(
column_association_resolver=DunderColumnAssociationResolver(semantic_manifest_lookup),
Expand All @@ -358,7 +355,6 @@ def __init__(

self._dataflow_plan_builder = DataflowPlanBuilder(
source_nodes=source_nodes,
source_nodes_without_measures=source_nodes_without_measures,
semantic_manifest_lookup=self._semantic_manifest_lookup,
)
self._to_sql_query_plan_converter = DataflowToSqlQueryPlanConverter(
Expand Down
1 change: 0 additions & 1 deletion metricflow/test/dataflow/builder/test_cyclic_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def cyclic_join_manifest_dataflow_plan_builder( # noqa: D

return DataflowPlanBuilder(
source_nodes=consistent_id_object_repository.cyclic_join_source_nodes,
source_nodes_without_measures=consistent_id_object_repository.simple_model_source_nodes_without_measures,
semantic_manifest_lookup=cyclic_join_semantic_manifest_lookup,
cost_function=DefaultCostFunction(),
)
Expand Down
3 changes: 0 additions & 3 deletions metricflow/test/fixtures/dataflow_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def dataflow_plan_builder( # noqa: D
) -> DataflowPlanBuilder:
return DataflowPlanBuilder(
source_nodes=consistent_id_object_repository.simple_model_source_nodes,
source_nodes_without_measures=consistent_id_object_repository.simple_model_source_nodes_without_measures,
semantic_manifest_lookup=simple_semantic_manifest_lookup,
cost_function=DefaultCostFunction(),
)
Expand All @@ -48,7 +47,6 @@ def multihop_dataflow_plan_builder( # noqa: D
) -> DataflowPlanBuilder:
return DataflowPlanBuilder(
source_nodes=consistent_id_object_repository.multihop_model_source_nodes,
source_nodes_without_measures=consistent_id_object_repository.simple_model_source_nodes_without_measures,
semantic_manifest_lookup=multi_hop_join_semantic_manifest_lookup,
cost_function=DefaultCostFunction(),
)
Expand All @@ -70,7 +68,6 @@ def scd_dataflow_plan_builder( # noqa: D
) -> DataflowPlanBuilder:
return DataflowPlanBuilder(
source_nodes=consistent_id_object_repository.scd_model_source_nodes,
source_nodes_without_measures=consistent_id_object_repository.simple_model_source_nodes_without_measures,
semantic_manifest_lookup=scd_semantic_manifest_lookup,
cost_function=DefaultCostFunction(),
column_association_resolver=scd_column_association_resolver,
Expand Down
4 changes: 0 additions & 4 deletions metricflow/test/fixtures/model_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ class ConsistentIdObjectRepository:
simple_model_data_sets: OrderedDict[str, SemanticModelDataSet]
simple_model_read_nodes: OrderedDict[str, ReadSqlSourceNode]
simple_model_source_nodes: Sequence[BaseOutput]
simple_model_source_nodes_without_measures: Sequence[BaseOutput]

multihop_model_read_nodes: OrderedDict[str, ReadSqlSourceNode]
multihop_model_source_nodes: Sequence[BaseOutput]
Expand Down Expand Up @@ -116,9 +115,6 @@ def consistent_id_object_repository(
simple_model_data_sets=sm_data_sets,
simple_model_read_nodes=_data_set_to_read_nodes(sm_data_sets),
simple_model_source_nodes=_data_set_to_source_nodes(simple_semantic_manifest_lookup, sm_data_sets),
simple_model_source_nodes_without_measures=_data_set_to_source_nodes(
simple_semantic_manifest_lookup, sm_data_sets, with_measures=False
),
multihop_model_read_nodes=_data_set_to_read_nodes(multihop_data_sets),
multihop_model_source_nodes=_data_set_to_source_nodes(
multi_hop_join_semantic_manifest_lookup, multihop_data_sets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@
<!-- distinct_values = False -->
<MetricTimeDimensionTransformNode>
<!-- description = Metric Time Dimension 'ds' -->
<!-- node_id = sma_10017 -->
<!-- node_id = sma_10010 -->
<!-- aggregation_time_dimension = ds -->
<ReadSqlSourceNode>
<!-- description = -->
<!-- Read From SemanticModelDataSet(SemanticModelReference(semantic_model_name='listings_latest')) -->
<!-- node_id = rss_10054 -->
<!-- node_id = rss_10044 -->
<!-- data_set = -->
<!-- SemanticModelDataSet(SemanticModelReference(semantic_model_name='listings_latest')) -->
</ReadSqlSourceNode>
Expand All @@ -86,7 +86,7 @@
<ReadSqlSourceNode>
<!-- description = -->
<!-- Read From SemanticModelDataSet(SemanticModelReference(semantic_model_name='listings_latest_cyclic')) -->
<!-- node_id = rss_10055 -->
<!-- node_id = rss_10045 -->
<!-- data_set = -->
<!-- SemanticModelDataSet(SemanticModelReference(semantic_model_name='listings_latest_cyclic')) -->
</ReadSqlSourceNode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
<!-- distinct_values = True -->
<MetricTimeDimensionTransformNode>
<!-- description = Metric Time Dimension 'ds' -->
<!-- node_id = sma_10011 -->
<!-- node_id = sma_10004 -->
<!-- aggregation_time_dimension = ds -->
<ReadSqlSourceNode>
<!-- description = -->
<!-- Read From SemanticModelDataSet(SemanticModelReference(semantic_model_name='listings_latest')) -->
<!-- node_id = rss_10024 -->
<!-- node_id = rss_10014 -->
<!-- data_set = -->
<!-- SemanticModelDataSet(SemanticModelReference(semantic_model_name='listings_latest')) -->
</ReadSqlSourceNode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@
<!-- distinct_values = False -->
<MetricTimeDimensionTransformNode>
<!-- description = Metric Time Dimension 'ds' -->
<!-- node_id = sma_10014 -->
<!-- node_id = sma_10007 -->
<!-- aggregation_time_dimension = ds -->
<ReadSqlSourceNode>
<!-- description = -->
<!-- Read From SemanticModelDataSet(SemanticModelReference(semantic_model_name='account_month_txns')) -->
<!-- node_id = rss_10035 -->
<!-- node_id = rss_10025 -->
<!-- data_set = -->
<!-- SemanticModelDataSet(SemanticModelReference(semantic_model_name='account_month_txns')) -->
</ReadSqlSourceNode>
Expand Down Expand Up @@ -136,7 +136,7 @@
<ReadSqlSourceNode>
<!-- description = -->
<!-- Read From SemanticModelDataSet(SemanticModelReference(semantic_model_name='bridge_table')) -->
<!-- node_id = rss_10036 -->
<!-- node_id = rss_10026 -->
<!-- data_set = -->
<!-- SemanticModelDataSet(SemanticModelReference(semantic_model_name='bridge_table')) -->
</ReadSqlSourceNode>
Expand Down Expand Up @@ -359,7 +359,7 @@
<ReadSqlSourceNode>
<!-- description = -->
<!-- Read From SemanticModelDataSet(SemanticModelReference(semantic_model_name='customer_table')) -->
<!-- node_id = rss_10038 -->
<!-- node_id = rss_10028 -->
<!-- data_set = -->
<!-- SemanticModelDataSet(SemanticModelReference(semantic_model_name='customer_table')) -->
</ReadSqlSourceNode>
Expand Down

0 comments on commit 2074663

Please sign in to comment.