<@U041QSEF2H2> or <@U042126MG49> could one of you ...
# daft-dev
c
@Sammy Sidhu or @jay could one of you take a look at this pr. https://github.com/Eventual-Inc/Daft/pull/4034 it adds a pretty significant change to our datatypes system by using subclasses to represent the different variants. This should be familiar for anyone coming from pyarrow or polars. They both represent their datatype system via subclasses.
👀 1
for additional context, I decided to go with the subclasses as it is the convention set by other libraries (pyarrow, polars, ...). I believe @R. C. Howell was suggesting keeping it as a sum type and exposing the attributes directly on
DataType
instead of subclassing. (and having it return an
AttributeException
if trying to access it on the wrong type).
I'm fine with this approach too, but it does deviate quite a bit from other libraries. do either of you have a preference here @Sammy Sidhu @jay
r
> keeping it as a sum type and exposing the attributes directly on
DataType
instead of subclassing. (and having it return an
AttributeException
if trying to access it on the wrong type
There are not mutually exclusive, but we should push all switching on the rust side. I don't mind if you want additional classes, just that we implement this sanely.
j
@Sammy Sidhu is taking a look
🙌 1
s
Just left my 2c on the PR