Open lars-reimann opened 2 weeks ago
Question I am checking the types using
T_co = TypeVar("T_co", covariant=True)
P_contra = TypeVar("P_contra", contravariant=True)
R_co = TypeVar("R_co", covariant=True)
``` and for example doing
```python
def add(self: Cell[T_co], other: Cell[T_co]) -> Cell[R_co]: ...
the user sees something like
(method) def add(other: Cell[int]) -> Cell[int]
but what do T_co
R_co
P_contra
actually mean ?
Add do we need to write new tests to see if the checking works ?
That's Python's type system. T
/R
/P
are the actual, arbitrary names of type variables. The _co
/_contra
suffix is a convention to indicate the variance of the type variable.
Python's type system is not capable of capturing the type of the cell at runtime, though. You need to add an actual field for that.
Is your feature request related to a problem?
Cells are our concept to lazily (i.e. the data must not be loaded immediately) execute vectorized operations on tables. The laziness is essential for efficiency, since it enables optimization of queries and more. However, the drawback of the laziness is that validation of operations on cells also happens very late.
Desired solution
Type computation:
None
.Type checking:
Possible alternatives (optional)
No response
Screenshots (optional)
No response
Additional Context (optional)
No response