chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
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
|
||||
Reference in New Issue
Block a user