-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20487/
-----------------------------------------------------------

Review request for Tajo.


Bugs: TAJO-763
    https://issues.apache.org/jira/browse/TAJO-763


Repository: tajo


Description
-------

default> select utc_usec_to('hour', (TIMESTAMP '2013-04-05 
08:00:00')::INT8*1000);
result: 1 rows (9 B)
?utc_usec_to
-------------------------------
1365116400000000
default> select utc_usec_to('hour', (TIMESTAMP '2013-04-05 
09:00:00')::INT8*1000);
Value 24 for hourOfDay must be in the range [0,23]


This issue is due to getting 'clockhourOfDay' format instead of 'hourOfDay' 
format from DateTime value and reorganizing a new DateTime value with 
'clockhourOfDay' formatted time value which is not accepted when building 
DateTime.
This has been fixed in TimeStampUtil class
I have also made a test class that can be used for testing TimeStampUtil class.

It is working well after the patch as follows

default> select utc_usec_to('hour', (TIMESTAMP '2013-04-05 
09:00:00')::INT8*1000);
result: 1 rows (9 B)
?utc_usec_to
-------------------------------
1365120000000000


Diffs
-----

  tajo-common/src/main/java/org/apache/tajo/util/TimeStampUtil.java 31c5b90 
  tajo-common/src/test/java/org/apache/tajo/util/TestTimeStampUtil.java 
PRE-CREATION 

Diff: https://reviews.apache.org/r/20487/diff/


Testing
-------

mvn clean install passed
mvn verify passed


File Attachments
----------------

TAJO-763.patch
  
https://reviews.apache.org/media/uploaded/files/2014/04/18/1a92f340-d7e4-42c5-8754-4dc0c6c1a645__TAJO-763.patch


Thanks,

Ilhyun Suh

Reply via email to