sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject sqoop git commit: SQOOP-2728: Sqoop2: Avoid casting after calling getObject on ResultSet
Date Thu, 17 Dec 2015 09:38:59 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 733da6bc4 -> c5962f8e1


SQOOP-2728: Sqoop2: Avoid casting after calling getObject on ResultSet

(Abraham Fine via Jarek Jarcec Cecho)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/c5962f8e
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/c5962f8e
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/c5962f8e

Branch: refs/heads/sqoop2
Commit: c5962f8e154a0e7b334236a71687a39f5c40d340
Parents: 733da6b
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Thu Dec 17 10:38:28 2015 +0100
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Thu Dec 17 10:38:28 2015 +0100

----------------------------------------------------------------------
 .../org/apache/sqoop/connector/jdbc/GenericJdbcExtractor.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/c5962f8e/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExtractor.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExtractor.java
b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExtractor.java
index d56abec..0235f28 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExtractor.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExtractor.java
@@ -70,15 +70,15 @@ public class GenericJdbcExtractor extends Extractor<LinkConfiguration,
FromJobCo
           switch (schemaColumn.getType()) {
           case DATE:
             // convert the sql date to JODA time as prescribed the Sqoop IDF spec
-            array[i] = LocalDate.fromDateFields((java.sql.Date)resultSet.getObject(i + 1));
+            array[i] = LocalDate.fromDateFields(resultSet.getDate(i + 1));
             break;
           case DATE_TIME:
             // convert the sql date time to JODA time as prescribed the Sqoop IDF spec
-            array[i] = LocalDateTime.fromDateFields((java.sql.Timestamp)resultSet.getObject(i
+ 1));
+            array[i] = LocalDateTime.fromDateFields(resultSet.getTimestamp(i + 1));
             break;
           case TIME:
             // convert the sql time to JODA time as prescribed the Sqoop IDF spec
-            array[i] = LocalTime.fromDateFields((java.sql.Time)resultSet.getObject(i + 1));
+            array[i] = LocalTime.fromDateFields(resultSet.getTime(i + 1));
             break;
           default:
             //for anything else


Mime
View raw message