Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
schrockn committed Mar 8, 2024
1 parent 3f31fbb commit 14e6b97
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,11 @@ def get_tags_for_partition_key(self, partition_key: str) -> Mapping[str, str]:

@property
def time_window_dimension(self) -> PartitionDimensionDefinition:
check.invariant(self.has_time_window_dimension, "Must have time window dimension")
check.inst(
self.primary_dimension.partitions_def,
TimeWindowPartitionsDefinition,
"Sanity check that assumption that primary is time-windowed if it exists",
time_window_dims = self._get_time_window_dims()
check.invariant(
len(time_window_dims) == 1, "Expected exactly one time window partitioned dimension"
)
return self.primary_dimension
return next(iter(time_window_dims))

def _get_time_window_dims(self) -> List[PartitionDimensionDefinition]:
return [
Expand Down

0 comments on commit 14e6b97

Please sign in to comment.