vdiravka commented on a change in pull request #1397: DRILL-6633: Replace usage 
of Guava classes by JDK ones
URL: https://github.com/apache/drill/pull/1397#discussion_r210826961
 
 

 ##########
 File path: 
exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java
 ##########
 @@ -221,68 +224,68 @@ public void testTrueOpForNonNullableType() throws 
Exception{
 
   @Test
   public void testDateTimeAccessors() throws Exception{
-    withNoDefaultSchema().withConnection(new Function<Connection, Void>() {
-      public Void apply(Connection connection) {
-        try {
-          final Statement statement = connection.createStatement();
-
-          // show tables on view
-          final ResultSet resultSet = statement.executeQuery(
-              "select date '2008-2-23', time '12:23:34', timestamp '2008-2-23 
12:23:34.456', " +
-              "interval '1' year, interval '2' day, " +
-              "date_add(date '2008-2-23', interval '1 10:20:30' day to 
second), " +
-              "date_add(date '2010-2-23', 1) " +
-              "from cp.`employee.json` limit 1");
-
-          resultSet.next();
-          final java.sql.Date date = resultSet.getDate(1);
-          final java.sql.Time time = resultSet.getTime(2);
-          final java.sql.Timestamp ts = resultSet.getTimestamp(3);
-          final String intervalYear = resultSet.getString(4);
-          final String intervalDay  = resultSet.getString(5);
-          final java.sql.Timestamp ts1 = resultSet.getTimestamp(6);
-          final java.sql.Date date1 = resultSet.getDate(7);
-
-          final java.sql.Timestamp result = 
java.sql.Timestamp.valueOf("2008-2-24 10:20:30");
-          final java.sql.Date result1 = java.sql.Date.valueOf("2010-2-24");
-          assertEquals(ts1, result);
-          assertEquals(date1, result1);
-
-          // TODO:  Purge nextUntilEnd(...) and calls when remaining fragment
-          // race conditions are fixed (not just DRILL-2245 fixes).
-          // nextUntilEnd(resultSet);
-          statement.close();
-          return null;
-        } catch (Exception e) {
-          throw new RuntimeException(e);
+    withNoDefaultSchema().withConnection(
+        (Function<Connection, Void>) connection -> {
+          try {
+            final Statement statement = connection.createStatement();
+
+            // show tables on view
+            final ResultSet resultSet = statement.executeQuery(
+                "select date '2008-2-23', time '12:23:34', timestamp 
'2008-2-23 12:23:34.456', " +
+                "interval '1' year, interval '2' day, " +
+                "date_add(date '2008-2-23', interval '1 10:20:30' day to 
second), " +
+                "date_add(date '2010-2-23', 1) " +
+                "from cp.`employee.json` limit 1");
+
+            resultSet.next();
+            final Date date = resultSet.getDate(1);
 
 Review comment:
   finals?

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to