Creates a Join wrapper. Args: join: A join to cast.
(
self,
join: computedobject.ComputedObject,
)
| 28 | _initialized: bool = False |
| 29 | |
| 30 | def __init__( |
| 31 | self, |
| 32 | join: computedobject.ComputedObject, |
| 33 | ): |
| 34 | """Creates a Join wrapper. |
| 35 | |
| 36 | Args: |
| 37 | join: A join to cast. |
| 38 | """ |
| 39 | self.initialize() |
| 40 | |
| 41 | if isinstance(join, computedobject.ComputedObject): |
| 42 | # There is no server-side constructor for ee.Join. Pass the object as-is |
| 43 | # to the server in case it is intended to be a Join cast. |
| 44 | super().__init__(join.func, join.args, join.varName) |
| 45 | return |
| 46 | |
| 47 | raise TypeError( |
| 48 | f'Join can only be used as a cast to Join. Found {type(join)}.') |
| 49 | |
| 50 | @classmethod |
| 51 | def initialize(cls) -> None: |