From b00f2681157abaeba3a1532874ce494415cfe0ec Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Wed, 21 Aug 2024 11:33:35 -0700 Subject: [PATCH] Improve log for better debugging --- metricflow/plan_conversion/dataflow_to_sql.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/metricflow/plan_conversion/dataflow_to_sql.py b/metricflow/plan_conversion/dataflow_to_sql.py index 63592b54f7..ddb2024609 100644 --- a/metricflow/plan_conversion/dataflow_to_sql.py +++ b/metricflow/plan_conversion/dataflow_to_sql.py @@ -924,7 +924,10 @@ def visit_combine_aggregated_outputs_node(self, node: CombineAggregatedOutputsNo linkable_specs = from_data_set.data_set.instance_set.spec_set.linkable_specs assert all( [set(x.data_set.instance_set.spec_set.linkable_specs) == set(linkable_specs) for x in join_data_sets] - ), "All parent nodes should have the same set of linkable instances since all values are coalesced." + ), ( + "All join data sets should have the same set of linkable instances as the from dataset since all values are coalesced. " + f"Got from dataset: {from_data_set}\nGot join datasets: {join_data_sets}" + ) linkable_spec_set = from_data_set.data_set.instance_set.spec_set.transform(SelectOnlyLinkableSpecs()) join_type = SqlJoinType.CROSS_JOIN if len(linkable_spec_set.all_specs) == 0 else SqlJoinType.FULL_OUTER