Skip to content

Commit

Permalink
Use dunder column resolver instead of qualified name to display specs…
Browse files Browse the repository at this point in the history
… in FilterElementsNode

This will more accurately match the column name since it includes more information about the spec
  • Loading branch information
courtneyholcomb committed Dec 21, 2024
1 parent f28c213 commit 1d34121
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion metricflow/dataflow/nodes/filter_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from metricflow_semantics.dag.id_prefix import IdPrefix, StaticIdPrefix
from metricflow_semantics.dag.mf_dag import DisplayedProperty
from metricflow_semantics.mf_logging.pretty_print import mf_pformat
from metricflow_semantics.specs.dunder_column_association_resolver import DunderColumnAssociationResolver
from metricflow_semantics.specs.spec_set import InstanceSpecSet
from metricflow_semantics.visitor import VisitorOutputT

Expand Down Expand Up @@ -57,7 +58,8 @@ def description(self) -> str: # noqa: D102
if self.replace_description:
return self.replace_description

return f"Pass Only Elements: {mf_pformat([x.qualified_name for x in self.include_specs.all_specs])}"
column_resolver = DunderColumnAssociationResolver()
return f"Pass Only Elements: {mf_pformat([column_resolver.resolve_spec(spec).column_name for spec in self.include_specs.all_specs])}"

@property
def displayed_properties(self) -> Sequence[DisplayedProperty]: # noqa: D102
Expand Down

0 comments on commit 1d34121

Please sign in to comment.