Files
2026-07-13 13:17:40 +08:00

30 lines
706 B
Python

from typing import TYPE_CHECKING
from .operator import Operator
if TYPE_CHECKING:
from ray.data.context import DataContext
class Plan:
"""Abstract class for logical/physical execution plans.
This plan should hold an operator representing the plan DAG and any auxiliary data
that's useful for plan optimization or execution.
"""
def __init__(self, context: "DataContext"):
self._context = context
@property
def dag(self) -> Operator:
raise NotImplementedError
@property
def context(self) -> "DataContext":
return self._context
@context.setter
def context(self, context: "DataContext") -> None:
self._context = context