I guess it would make sense to just store the time of day value in
milliseconds to go along with the DATE type that contains days since epoch,
which would fit into a 4 byte value.  Only I see conflicting code in
TypeLayout.java that defines the schema as 64 bit width

public TypeLayout visit(Time type) {
    return newFixedWidthTypeLayout(dataVector(64));
}

And in C++ there is this comment
  // Exact time encoded with int64, default unit millisecond
  TIME,

Does the TIME type still need to go through some discussion to get pinned
down?

Thanks,
Bryan

On Thu, Mar 9, 2017 at 10:53 AM, Bryan Cutler <cutl...@gmail.com> wrote:

> Hello All,
>
> I've started work on ARROW-582 to add Date/Time support for Java JSON
> files and would just like to clear up a few things.  I believe the Java
> Time type is supposed to represent milliseconds since epoch, it is stored
> as a FixedValueVector with a width of 4 bytes (equivalent to Java 'int')
> and it retrieved by constructing a org.joda.time.DateTime with that value.
> Shouldn't this be an 8 byte width, equivalent to Java 'long'?
>
>     <#elseif minor.class == "Time">
>     @Override
>     public DateTime getObject(int index) {
>
>         org.joda.time.DateTime time = new org.joda.time.DateTime(get(index),
> org.joda.time.DateTimeZone.UTC);
>         time = time.withZoneRetainFields(org.joda.time.DateTimeZone.
> getDefault());
>         return time;
>     }
>
> Thanks,
> Bryan
>

Reply via email to