[ 
https://issues.apache.org/jira/browse/DRILL-4583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16497367#comment-16497367
 ] 

ASF GitHub Bot commented on DRILL-4583:
---------------------------------------

ilooner closed pull request #465: DRILL-4583: Test fails on 
TestNewDateFunctions#testIsDate
URL: https://github.com/apache/drill/pull/465
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestNewDateFunctions.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestNewDateFunctions.java
index 257cc53f74..8def18a185 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestNewDateFunctions.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestNewDateFunctions.java
@@ -51,9 +51,9 @@ public void testIsDate() throws Exception {
         .sqlQuery("select case when isdate(date1) then cast(date1 as date) 
else null end res1 from " + dateValues)
         .unOrdered()
         .baselineColumns("res1")
-        .baselineValues(new DateTime(Date.valueOf("1900-01-01").getTime()))
-        .baselineValues(new DateTime(Date.valueOf("3500-01-01").getTime()))
-        .baselineValues(new DateTime(Date.valueOf("2000-12-31").getTime()))
+        .baselineValues(new DateTime(1900, 1, 1, 0, 0, 0))
+        .baselineValues(new DateTime(3500, 1, 1, 0, 0, 0))
+        .baselineValues(new DateTime(2000, 12, 31, 0, 0, 0))
         .baselineValues(new Object[] {null})
         .baselineValues(new Object[] {null})
         .baselineValues(new Object[] {null})


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Test fails on TestNewDateFunctions#testIsDate
> ---------------------------------------------
>
>                 Key: DRILL-4583
>                 URL: https://issues.apache.org/jira/browse/DRILL-4583
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>            Reporter: Jihun Kang
>            Priority: Minor
>
> When supplying negative time millis from java date to joda datetime, joda 
> datetime does not correctly translate to the expected value. Here is error 
> log when running a single test case.
> {noformat}
> Running org.apache.drill.exec.fn.impl.TestNewDateFunctions#testIsDate
> java.lang.Exception: After matching 0 records, did not find expected record 
> in result set: `res1` : 1899-12-31T23:27:52.000+08:27:52, 
> Some examples of expected records:`res1` : 1899-12-31T23:27:52.000+08:27:52, 
> `res1` : 3500-01-01T00:00:00.000+09:00, 
> `res1` : 2000-12-31T00:00:00.000+09:00, 
> `res1` : null, 
> `res1` : null, 
> `res1` : null, 
>  Some examples of records returned by the test query:`res1` : 
> 1900-01-01T00:00:00.000+08:27:52, 
> `res1` : 3500-01-01T00:00:00.000+09:00, 
> `res1` : 2000-12-31T00:00:00.000+09:00, 
> `res1` : null, 
> `res1` : null, 
> `res1` : null, 
>       at 
> org.apache.drill.DrillTestWrapper.compareResults(DrillTestWrapper.java:640)
>       at 
> org.apache.drill.DrillTestWrapper.compareUnorderedResults(DrillTestWrapper.java:371)
>       at org.apache.drill.DrillTestWrapper.run(DrillTestWrapper.java:128)
>       at 
> org.apache.drill.exec.fn.impl.TestNewDateFunctions.testIsDate(TestNewDateFunctions.java:61)
>       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)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to