Skip to content

Commit

Permalink
Delete StepExecutionContext.partition_mapping_for_input (#21483)
Browse files Browse the repository at this point in the history
## Summary & Motivation

Delete unused function

## How I Tested These Changes
  • Loading branch information
schrockn authored Apr 30, 2024
1 parent 7e61ed8 commit 9bc32ed
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions python_modules/dagster/dagster/_core/execution/context/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
from dagster._core.definitions.partition import PartitionsDefinition, PartitionsSubset
from dagster._core.definitions.partition_key_range import PartitionKeyRange
from dagster._core.definitions.partition_mapping import (
PartitionMapping,
infer_partition_mapping,
)
from dagster._core.definitions.policy import RetryPolicy
Expand Down Expand Up @@ -972,24 +971,6 @@ def maybe_fetch_and_get_input_asset_version_info(
def fetch_external_input_asset_version_info(self) -> None:
return self._data_version_cache.fetch_external_input_asset_version_info()

def partition_mapping_for_input(self, input_name: str) -> Optional[PartitionMapping]:
asset_layer = self.job_def.asset_layer
upstream_asset_key = asset_layer.asset_key_for_input(self.node_handle, input_name)
if upstream_asset_key:
upstream_asset_partitions_def = asset_layer.get(upstream_asset_key).partitions_def
assets_def = asset_layer.assets_def_for_node(self.node_handle)
partitions_def = assets_def.partitions_def if assets_def else None
explicit_partition_mapping = self.job_def.asset_layer.partition_mapping_for_node_input(
self.node_handle, upstream_asset_key
)
return infer_partition_mapping(
explicit_partition_mapping,
partitions_def,
upstream_asset_partitions_def,
)
else:
return None

# Call this to clear the cache for an input asset record. This is necessary when an old
# materialization for an asset was loaded during `fetch_external_input_asset_records` because an
# intrastep asset is not required, but then that asset is materialized during the step. If we
Expand Down

0 comments on commit 9bc32ed

Please sign in to comment.