cyavro icon indicating copy to clipboard operation
cyavro copied to clipboard

Support datetime values

Open mariusvniekerk opened this issue 8 years ago • 3 comments

Since avro 1.8.0 support for datetime has been added to the format. We should support reading that.

Sent from my Google Pixel using FastHub

mariusvniekerk avatar Aug 23 '17 16:08 mariusvniekerk

These may be harder to do since the C avro api does not support logical types.

mariusvniekerk avatar Sep 08 '17 13:09 mariusvniekerk

This could easily be done in dask_reader.read_avro_bytes, where there is a step to assign values from those loaded into the pre-allocated dataframe. (That doesn't solve the general problem for those not using the interface) You can always assign int values directly into a numpy array of time type, but it would require multiplication by some factor to become the correct ns resolution.

martindurant avatar Sep 08 '17 13:09 martindurant

https://github.com/maxpoint/cyavro/pull/24/files#diff-7a8f47ca203140559f8ca8b671f51af1R278

martindurant avatar Sep 08 '17 18:09 martindurant