mojo-data / arrow.mojo

Apache Arrow in Mojo🔥
Apache License 2.0
31 stars 4 forks source link

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

Open martinvuyk opened 1 week ago

martinvuyk commented 1 week ago

Closes #9

sa- commented 1 week ago

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

martinvuyk commented 1 week 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 6 days ago

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

martinvuyk commented 8 hours 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