You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by William <yh...@163.com> on 2016/02/01 10:21:27 UTC

why time and date data types are signed types?

Hi all,
   For time and date data types, such as Time, Date and Timestamp, we cannot say a Time value is negative or positive and they don't have the 'binary sort issue' as signed integer has. So I think they should be implemented as UNSIGNED_LONG instead of LONG.
  Can someone tell me why they are implemented as signed types?


Thanks

Re: why time and date data types are signed types?

Posted by James Taylor <ja...@apache.org>.
Hi William,
Our date types are signed so that you get a larger range: both positive
millis after 1/1/1970 and negative millis before 1/1/1970.
Thanks,
James

On Monday, February 1, 2016, William <yh...@163.com> wrote:

> Hi all,
>    For time and date data types, such as Time, Date and Timestamp, we
> cannot say a Time value is negative or positive and they don't have the
> 'binary sort issue' as signed integer has. So I think they should be
> implemented as UNSIGNED_LONG instead of LONG.
>   Can someone tell me why they are implemented as signed types?
>
> Thanks
>
>
>
>