mojo-data / arrow.mojo

Apache Arrow in Mojo🔥
Apache License 2.0
42 stars 2 forks source link

Add list optional T constructor for ArrowFixedWidthVector and change to dtypepointer #30

Closed martinvuyk closed 4 months ago

martinvuyk commented 4 months ago

Closes #9

sa- commented 4 months ago

This is a nice change, could you please add tests for it?

martinvuyk commented 4 months ago

added a thorough test and changed this API a bit WDYT ?

    fn __getitem__(self, index: Int) -> Optional[Scalar[T]]:
        if not (0 <= index < self.length):
            return None
        if not self.validity[index]:
            return None
        return self.view[index]
sa- commented 4 months ago

Did the tests pass on your machine? Were you using a nightly?

martinvuyk commented 4 months ago

Did the tests pass on your machine? Were you using a nightly?

yes they did then and they do now as well with nightly mojo 2024.7.205