Skip to content

Commit

Permalink
/* PR_START p--query-resolution-perf 15 */ Remove unnecessary deepcopy.
Browse files Browse the repository at this point in the history
  • Loading branch information
plypaul committed Jul 19, 2024
1 parent 65b647a commit 01914ca
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import logging
from copy import deepcopy
from typing import Dict, List, Optional, Sequence, Set

from dbt_semantic_interfaces.protocols.dimension import Dimension
Expand Down Expand Up @@ -91,13 +90,11 @@ def get_dimension(self, dimension_reference: DimensionReference) -> Dimension:
f"Could not find dimension with name '{dimension_reference.element_name}' in configured semantic models"
)

dimension = SemanticModelLookup.get_dimension_from_semantic_model(
return SemanticModelLookup.get_dimension_from_semantic_model(
# Dimension object should match across semantic models, so just use the first semantic model.
semantic_model=semantic_models[0],
dimension_reference=dimension_reference,
)
# TODO: Unclear if the deepcopy is necessary.
return deepcopy(dimension)

def get_time_dimension(self, time_dimension_reference: TimeDimensionReference) -> Dimension:
"""Retrieves a full dimension object by name."""
Expand Down

0 comments on commit 01914ca

Please sign in to comment.