[Variant] Add primitive type timestamp_nanos(with&without timezone) and uuid#8149
[Variant] Add primitive type timestamp_nanos(with&without timezone) and uuid#8149alamb merged 3 commits intoapache:mainfrom
Conversation
e1c7f40 to
82489a3
Compare
|
spec said that UUID is stored as big-endian |
There was a problem hiding this comment.
UUID is stored as big-endian
335ed92 to
fc6e1b7
Compare
|
@alamb @superserious-dev Could you please help review this when you're free, thanks. |
There was a problem hiding this comment.
I double checked and this is correct compared to https://github.com/apache/parquet-format/blob/master/VariantEncoding.md#encoding-types
There was a problem hiding this comment.
I don't understand this comment
There was a problem hiding this comment.
Changed the implementation. When I implemented this, I did not notice that the DateTime::from_timestamp_nanos would never fail, added the comment to show why we use DateTime::from_timestamp instead of DateTime::from_timestamp_nanos
There was a problem hiding this comment.
I think having this be as_uuid(&self) -> Option<Uuid> would be both more consistent with the other methods that access variant data, as well as being more performant -- the caller could decide if they wanted to pay the cost to convert to string as well
I think the example is great, and we could show it as a way to convert to strings
There was a problem hiding this comment.
Changed the implementation. When I implemented this, I did not notice that the DateTime::from_timestamp_nanos would never fail, added the comment to show why we use DateTime::from_timestamp instead of DateTime::from_timestamp_nanos
a7df3ca to
41b3990
Compare
41b3990 to
c885cb6
Compare
|
@alamb thanks for the review. Updated the code to resolve the conflicts. The CI failed because of |
Yes I think that is is also happening on main -- I filed a ticket to track |
|
Thank you @klion26 |
|
@alamb thank you for the review and merging! |
Which issue does this PR close?
Rationale for this change
This PR adds remaining variant primitive types(timestamp_nanos/timestampntz_nanos/uuid)
What changes are included in this PR?
Are these changes tested?
Added some tests and reusing existing tests
Are there any user-facing changes?
No