Skip to content

Commit

Permalink
cp
Browse files Browse the repository at this point in the history
  • Loading branch information
schrockn committed Mar 11, 2024
1 parent c1c0891 commit b2a2725
Showing 1 changed file with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,6 @@ def compute_intersection_with_partition_keys(
) -> "AssetSlice":
"""Return a new AssetSlice with only the given partition keys if they are in the slice."""
return self._asset_graph_view.compute_intersection_with_partition_keys(partition_keys, self)
partitions_def = check.not_none(self._partitions_def, "Must have partitions def")
for partition_key in partition_keys:
if not partitions_def.has_partition_key(partition_key):
check.failed(
f"Partition key {partition_key} not in partitions def {self._partitions_def}"
)

return _slice_from_subset(
self._asset_graph_view,
self._compatible_subset
& AssetSubset.from_partition_keys(self.asset_key, partitions_def, partition_keys),
)


class AssetGraphView:
Expand Down Expand Up @@ -291,7 +279,11 @@ def compute_intersection_with_partition_keys(
self._get_partitions_def(asset_slice.asset_key), "Must have partitions def"
)
for partition_key in partition_keys:
if not partitions_def.has_partition_key(partition_key):
if not partitions_def.has_partition_key(
partition_key,
current_time=self.effective_dt,
dynamic_partitions_store=self._queryer,
):
check.failed(
f"Partition key {partition_key} not in partitions def {partitions_def}"
)
Expand Down

0 comments on commit b2a2725

Please sign in to comment.