You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jihun Kang (JIRA)" <ji...@apache.org> on 2016/04/06 03:05:25 UTC

[jira] [Created] (DRILL-4582) TestCastFunctions#testToDateForTimeStamp returns error by timezone difference

Jihun Kang created DRILL-4582:
---------------------------------

             Summary: TestCastFunctions#testToDateForTimeStamp returns error by timezone difference
                 Key: DRILL-4582
                 URL: https://issues.apache.org/jira/browse/DRILL-4582
             Project: Apache Drill
          Issue Type: Bug
          Components: Functions - Drill
    Affects Versions: 1.7.0
            Reporter: Jihun Kang
            Priority: Minor


When running drill tests on a machine with positive offsets of timezone, following error is created. This error comes from the joda datetime, because joda datetime create an object with default timezone.

{noformat}
Running org.apache.drill.exec.fn.impl.TestCastFunctions#testToDateForTimeStamp

java.lang.Exception: at position 0 column '`col`' mismatched values, expected: 1969-12-31T00:00:00.000+09:00(DateTime) but received 1970-01-01T00:00:00.000+09:00(DateTime)

Expected Records near verification failure:
Record Number: 0 { `col` : 1969-12-31T00:00:00.000+09:00, }


Actual Records near verification failure:
Record Number: 0 { `col` : 1970-01-01T00:00:00.000+09:00, }

For query: select to_date(to_timestamp(-1)) as col 
from (values(1))

	at org.apache.drill.DrillTestWrapper.compareMergedOnHeapVectors(DrillTestWrapper.java:436)
	at org.apache.drill.DrillTestWrapper.compareOrderedResults(DrillTestWrapper.java:390)
	at org.apache.drill.DrillTestWrapper.run(DrillTestWrapper.java:126)
	at org.apache.drill.exec.fn.impl.TestCastFunctions.testToDateForTimeStamp(TestCastFunctions.java:74)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:606)
Caused by: java.lang.Exception: at position 0 column '`col`' mismatched values, expected: 1969-12-31T00:00:00.000+09:00(DateTime) but received 1970-01-01T00:00:00.000+09:00(DateTime)

Expected Records near verification failure:
Record Number: 0 { `col` : 1969-12-31T00:00:00.000+09:00, }


Actual Records near verification failure:
Record Number: 0 { `col` : 1970-01-01T00:00:00.000+09:00, }

	at org.apache.drill.DrillTestWrapper.compareMergedVectors(DrillTestWrapper.java:174)
	at org.apache.drill.DrillTestWrapper.compareMergedOnHeapVectors(DrillTestWrapper.java:434)
	... 7 more
Caused by: java.lang.Exception: at position 0 column '`col`' mismatched values, expected: 1969-12-31T00:00:00.000+09:00(DateTime) but received 1970-01-01T00:00:00.000+09:00(DateTime)
	at org.apache.drill.DrillTestWrapper.compareValuesErrorOnMismatch(DrillTestWrapper.java:552)
	at org.apache.drill.DrillTestWrapper.compareMergedVectors(DrillTestWrapper.java:172)
	... 8 more
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)