JuliaIO / Parquet.jl

Julia implementation of Parquet columnar file format reader
Other
119 stars 32 forks source link

add methods to interpret some logical types #50

Closed tanmaykm closed 4 years ago

tanmaykm commented 4 years ago

The reader does not interpret any logical types. For example, timestamps that are INT96 values will be represented by default as Julia Int128 types (the next higher type available). Logical type information is also often not present in schema.

We could provide additional methods to interpret such fields. They can be applied on the values after they are read.

As of now this PR adds methods for timestamp (logical_timestamp) and strings (logical_string):

julia> for v in values
        println(logical_string(v.date_string_col), ", ", logical_timestamp(v.timestamp_col))
       end
04/01/09, 2009-04-01T12:00:00
04/01/09, 2009-04-01T12:01:00

fixes #49