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-2725: Sqoop2: Integration Tests: Prefer using Timestamp types and PreparedStatements for inserting rows into test databases
Date Tue, 15 Dec 2015 08:18:39 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 a53e682f0 -> 16c2cdcab


SQOOP-2725: Sqoop2: Integration Tests: Prefer using Timestamp types and PreparedStatements for inserting rows into test databases

(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/16c2cdca
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/16c2cdca
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/16c2cdca

Branch: refs/heads/sqoop2
Commit: 16c2cdcab562d0e1929c0a1e8daad05d9ee0027a
Parents: a53e682
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Tue Dec 15 09:18:00 2015 +0100
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Tue Dec 15 09:18:00 2015 +0100

----------------------------------------------------------------------
 .../common/test/asserts/ProviderAsserts.java    |  21 +--
 .../sqoop/common/test/db/DatabaseProvider.java  | 146 +++++++++++--------
 .../jdbc/GenericJdbcFromInitializer.java        |  51 ++++++-
 .../java/org/apache/sqoop/test/data/Cities.java |  12 +-
 .../apache/sqoop/test/data/UbuntuReleases.java  |  46 +++---
 .../test/infrastructure/SqoopTestCase.java      |  10 --
 .../sqoop/test/testcases/ConnectorTestCase.java |  17 +--
 .../connector/hdfs/AppendModeTest.java          |  24 +--
 .../connector/hdfs/FromHDFSToHDFSTest.java      |   8 +-
 .../connector/hdfs/HdfsIncrementalReadTest.java |  26 ++--
 .../hdfs/InformalJobNameExecuteTest.java        |  10 +-
 .../connector/hdfs/OutputDirectoryTest.java     |   8 +-
 .../connector/jdbc/generic/AllTypesTest.java    |   5 +-
 .../jdbc/generic/FromHDFSToRDBMSTest.java       |  19 +--
 .../jdbc/generic/FromRDBMSToHDFSTest.java       |  16 +-
 .../jdbc/generic/IncrementalReadTest.java       |  52 +++----
 .../connector/jdbc/generic/PartitionerTest.java |  40 ++---
 .../jdbc/generic/TableStagedRDBMSTest.java      |  20 +--
 .../connector/kafka/FromRDBMSToKafkaTest.java   |   8 +-
 19 files changed, 291 insertions(+), 248 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/common-test/src/main/java/org/apache/sqoop/common/test/asserts/ProviderAsserts.java
----------------------------------------------------------------------
diff --git a/common-test/src/main/java/org/apache/sqoop/common/test/asserts/ProviderAsserts.java b/common-test/src/main/java/org/apache/sqoop/common/test/asserts/ProviderAsserts.java
index 0da7ea8..4e1ef6a 100644
--- a/common-test/src/main/java/org/apache/sqoop/common/test/asserts/ProviderAsserts.java
+++ b/common-test/src/main/java/org/apache/sqoop/common/test/asserts/ProviderAsserts.java
@@ -21,6 +21,7 @@ import org.apache.sqoop.common.test.db.DatabaseProvider;
 import org.apache.log4j.Logger;
 import org.apache.sqoop.common.test.db.TableName;
 
+import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
@@ -44,23 +45,9 @@ public class ProviderAsserts {
    * @param conditions Conditions for identifying the row
    * @param values Values that should be present in the table
    */
-  public static void assertRow(DatabaseProvider provider, TableName tableName,  Object []conditions, Object ...values) {
-    assertRow(provider, tableName, true, conditions, values);
-  }
-
-  /**
-   * Assert row in the table.
-   *
-   * @param provider Provider that should be used to query the database
-   * @param tableName Table name
-   * @param escapeValues Flag whether the values should be escaped based on their type when using in the generated queries or not
-   * @param conditions Conditions for identifying the row
-   * @param values Values that should be present in the table
-   */
-  public static void assertRow(DatabaseProvider provider, TableName tableName, boolean escapeValues, Object []conditions, Object ...values) {
-    try (Statement stmt = provider.getConnection().createStatement();
-         ResultSet rs = stmt.executeQuery(provider.getRowsSql(tableName, escapeValues, conditions))) {
-
+  public static void assertRow(DatabaseProvider provider, TableName tableName,  Object[] conditions, Object ...values) {
+    try (PreparedStatement preparedStatement = provider.getRowsPreparedStatement(tableName, conditions);
+         ResultSet rs = preparedStatement.executeQuery()) {
       if(! rs.next()) {
         fail("No rows found.");
       }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/common-test/src/main/java/org/apache/sqoop/common/test/db/DatabaseProvider.java
----------------------------------------------------------------------
diff --git a/common-test/src/main/java/org/apache/sqoop/common/test/db/DatabaseProvider.java b/common-test/src/main/java/org/apache/sqoop/common/test/db/DatabaseProvider.java
index f30d587..3b0b568 100644
--- a/common-test/src/main/java/org/apache/sqoop/common/test/db/DatabaseProvider.java
+++ b/common-test/src/main/java/org/apache/sqoop/common/test/db/DatabaseProvider.java
@@ -22,13 +22,16 @@ import org.apache.log4j.Logger;
 import org.apache.sqoop.common.test.db.types.DatabaseTypeList;
 import org.apache.sqoop.common.test.db.types.DefaultTypeList;
 
+import java.math.BigDecimal;
 import java.sql.Connection;
+import java.sql.Date;
 import java.sql.DriverManager;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
 import java.sql.SQLException;
 import java.sql.Statement;
+import java.sql.Timestamp;
 import java.util.LinkedList;
 import java.util.List;
 
@@ -40,7 +43,9 @@ import java.util.List;
  * supported database server have it's own concrete implementation that fills
  * the gaps in database differences.
  */
-@edu.umd.cs.findbugs.annotations.SuppressWarnings("SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE")
+@edu.umd.cs.findbugs.annotations.SuppressWarnings
+  ({"SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE",
+    "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"})
 abstract public class DatabaseProvider {
 
   private static final Logger LOG = Logger.getLogger(DatabaseProvider.class);
@@ -266,86 +271,111 @@ abstract public class DatabaseProvider {
    * @param values List of objects that should be inserted
    */
   public void insertRow(TableName tableName, Object ...values) {
-    insertRow(tableName, true, values);
-  }
+    try {
+      StringBuilder sb = new StringBuilder("INSERT INTO ");
+      sb.append(getTableFragment(tableName));
+      sb.append(" VALUES (");
 
-  /**
-   * Insert new row into the table.
-   *
-   * @param tableName Table name
-   * @param escapeValues Should the values be escaped based on their type or not
-   * @param values List of objects that should be inserted
-   */
-  public void insertRow(TableName tableName, boolean escapeValues, Object ...values) {
-    StringBuilder sb = new StringBuilder("INSERT INTO ");
-    sb.append(getTableFragment(tableName));
-    sb.append(" VALUES (");
+      for (int i = 0; i < values.length - 1; i++) {
+        sb.append("?, ");
+      }
+      sb.append("?)");
 
-    List<String> valueList = new LinkedList<String>();
-    for(Object value : values) {
-      valueList.add(escapeValues ? convertObjectToQueryString(value) : value.toString());
-    }
+      PreparedStatement statement = null;
+      try {
+        statement = databaseConnection.prepareStatement(sb.toString());
+        for (int i = 0; i < values.length; i++) {
+          insertObjectIntoPreparedStatement(statement, i +1, values[i]);
+        }
 
-    sb.append(StringUtils.join(valueList, ", "));
-    sb.append(")");
+        statement.executeUpdate();
+      } finally {
+        if (statement != null) {
+          statement.close();
+        }
+      }
+    } catch (SQLException sqlException) {
+      throw new RuntimeException("can't insert row", sqlException);
+    }
 
-    executeUpdate(sb.toString());
   }
 
   /**
    * Return rows that match given conditions.
    *
    * @param tableName Table name
-   * @param escapeValues Should the values be escaped based on their type or not
    * @param conditions Conditions in form of double values - column name and value, for example: "id", 1 or "last_update_date", null
-   * @return ResultSet with given criteria
+   * @return PreparedStatement representing the requested query
    */
-  public String getRowsSql(TableName tableName, boolean escapeValues, Object []conditions) {
-    // Columns are in form of two strings - name and value
-    if(conditions.length % 2 != 0) {
-      throw new RuntimeException("Incorrect number of parameters.");
-    }
+  public PreparedStatement getRowsPreparedStatement(TableName tableName, Object[] conditions) {
+    try {
+      // Columns are in form of two strings - name and value
+      if(conditions.length % 2 != 0) {
+        throw new RuntimeException("Incorrect number of parameters.");
+      }
 
-    StringBuilder sb = new StringBuilder("SELECT * FROM ");
-    sb.append(getTableFragment(tableName));
+      StringBuilder sb = new StringBuilder("SELECT * FROM ");
+      sb.append(getTableFragment(tableName));
+
+      List<String> conditionList = new LinkedList<String>();
+      for(int i = 0; i < conditions.length; i += 2) {
+        Object columnName = conditions[i];
+        Object value = conditions[i + 1];
+
+        if( !(columnName instanceof String)) {
+          throw new RuntimeException("Each odd item should be a string with column name.");
+        }
 
-    List<String> conditionList = new LinkedList<String>();
-    for(int i = 0; i < conditions.length; i += 2) {
-      Object columnName = conditions[i];
-      Object value = conditions[i + 1];
+        if(value == null) {
+          conditionList.add(escapeColumnName((String) columnName) + " IS NULL");
+        } else {
+          conditionList.add(escapeColumnName((String) columnName) + " = ?");
+        }
+      }
 
-      if( !(columnName instanceof String)) {
-        throw new RuntimeException("Each odd item should be a string with column name.");
+      if(conditionList.size() != 0) {
+        sb.append(" WHERE ").append(StringUtils.join(conditionList, " AND "));
       }
 
-      if(value == null) {
-        conditionList.add(escapeColumnName((String) columnName) + " IS NULL");
-      } else {
-        conditionList.add(escapeColumnName((String) columnName) + " = " + (escapeValues ? convertObjectToQueryString(value) : value));
+      PreparedStatement preparedStatement = getConnection().prepareStatement(sb.toString());
+      for(int i = 1; i < conditions.length; i += 2) {
+        Object value = conditions[i];
+        if (value != null) {
+          insertObjectIntoPreparedStatement(preparedStatement, i, value);
+        }
       }
-    }
 
-    if(conditionList.size() != 0) {
-      sb.append(" WHERE ").append(StringUtils.join(conditionList, " AND "));
+      return preparedStatement;
+    } catch (SQLException sqlException) {
+      throw new RuntimeException("can't insert row", sqlException);
     }
-
-    return sb.toString();
   }
 
-  /**
-   * Convert given object to it's representation that can be safely used inside
-   * query.
-   *
-   * @param value Value to convert
-   * @return Query safe string representation
-   */
-  public String convertObjectToQueryString(Object value) {
-    if(value == null) {
-      return nullConstant();
-    } else if(value.getClass() == String.class) {
-      return escapeValueString((String)value);
+  private void insertObjectIntoPreparedStatement(PreparedStatement preparedStatement, int parameterIndex, Object value) throws SQLException {
+    if (value instanceof String) {
+      preparedStatement.setString(parameterIndex, (String) value);
+    } else if (value instanceof Short) {
+      preparedStatement.setShort(parameterIndex, ((Short) value).shortValue());
+    } else if (value instanceof Integer) {
+      preparedStatement.setInt(parameterIndex, ((Integer) value).intValue());
+    } else if (value instanceof Long) {
+      preparedStatement.setLong(parameterIndex, ((Long) value).longValue());
+    } else if (value instanceof Float) {
+      preparedStatement.setFloat(parameterIndex, ((Float) value).floatValue());
+    } else if (value instanceof Double) {
+      preparedStatement.setDouble(parameterIndex, ((Double) value).doubleValue());
+    } else if (value instanceof Boolean) {
+      preparedStatement.setBoolean(parameterIndex, ((Boolean) value).booleanValue());
+    } else if (value instanceof Byte) {
+      preparedStatement.setByte(parameterIndex, ((Byte) value).byteValue());
+    } else if (value instanceof Character) {
+      preparedStatement.setString(parameterIndex, value.toString());
+    } else if (value instanceof Timestamp) {
+      preparedStatement.setString(parameterIndex, value.toString());
+    } else if (value instanceof BigDecimal) {
+      preparedStatement.setString(parameterIndex, value.toString());
     } else {
-      return value.toString();
+      preparedStatement.setObject(parameterIndex, value);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromInitializer.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromInitializer.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromInitializer.java
index fa26c14..41be8bb 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromInitializer.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromInitializer.java
@@ -17,11 +17,15 @@
  */
 package org.apache.sqoop.connector.jdbc;
 
+import java.math.BigDecimal;
+import java.sql.Date;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
 import java.sql.SQLException;
 import java.sql.Statement;
+import java.sql.Timestamp;
+import java.sql.Types;
 import java.util.List;
 import java.util.Set;
 
@@ -162,6 +166,10 @@ public class GenericJdbcFromInitializer extends Initializer<LinkConfiguration, F
 
     // If this is incremental, then we need to get new maximal value and persist is a constant
     String incrementalMaxValue = null;
+    // and the partition column metadata
+    int checkColumnScale = 0;
+    int checkColumnType = 0;
+
     if(incrementalImport) {
       sb.setLength(0);
       sb.append("SELECT ");
@@ -172,13 +180,38 @@ public class GenericJdbcFromInitializer extends Initializer<LinkConfiguration, F
       String incrementalNewMaxValueQuery = sb.toString();
       LOG.info("Incremental new max value query:  " + incrementalNewMaxValueQuery);
 
-      try (Statement statement = executor.createStatement();
-           ResultSet rs = statement.executeQuery(incrementalNewMaxValueQuery);) {
+      try (
+        PreparedStatement columnTypeStatement = executor.prepareStatement("SELECT " + executor.encloseIdentifier(jobConf.incrementalRead.checkColumn) + " FROM " + fromFragment + " WHERE 1 = 2");
+        ResultSet columnTypeResultSet = columnTypeStatement.executeQuery();
+        Statement statement = executor.createStatement();
+        ResultSet rs = statement.executeQuery(incrementalNewMaxValueQuery)
+      ) {
+        ResultSetMetaData checkColumnMetaData = columnTypeResultSet.getMetaData();
+        checkColumnScale = checkColumnMetaData.getScale(1);
+        checkColumnType = checkColumnMetaData.getColumnType(1);
+
         if (!rs.next()) {
           throw new SqoopException(GenericJdbcConnectorError.GENERIC_JDBC_CONNECTOR_0022);
         }
 
-        incrementalMaxValue = rs.getString(1);
+        switch (rs.getMetaData().getColumnType(1)) {
+          case Types.DATE:
+            incrementalMaxValue = rs.getDate(1).toString();
+            break;
+          case Types.TIMESTAMP:
+            incrementalMaxValue = rs.getTimestamp(1).toString();
+            break;
+          case Types.DECIMAL:
+          case Types.NUMERIC:
+          case Types.DOUBLE:
+          case Types.FLOAT:
+          case Types.REAL:
+            // Oracle drops precision data when using aggregate functions in the query
+            incrementalMaxValue = rs.getBigDecimal(1).setScale(checkColumnScale).toString();
+            break;
+          default:
+            incrementalMaxValue = rs.getString(1);
+        }
         context.setString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_LAST_INCREMENTAL_VALUE, incrementalMaxValue);
         LOG.info("New maximal value for incremental import is " + incrementalMaxValue);
       }
@@ -209,8 +242,16 @@ public class GenericJdbcFromInitializer extends Initializer<LinkConfiguration, F
     try {
       ps = executor.prepareStatement(minMaxQuery);
       if (incrementalImport) {
-        ps.setString(1, jobConf.incrementalRead.lastValue);
-        ps.setString(2, incrementalMaxValue);
+        if (checkColumnType == Types.DATE) {
+          ps.setDate(1, Date.valueOf(jobConf.incrementalRead.lastValue));
+          ps.setDate(2, Date.valueOf(incrementalMaxValue));
+        } else if (checkColumnType == Types.TIMESTAMP) {
+          ps.setTimestamp(1, Timestamp.valueOf(jobConf.incrementalRead.lastValue));
+          ps.setTimestamp(2, Timestamp.valueOf(incrementalMaxValue));
+        } else {
+          ps.setBigDecimal(1, new BigDecimal(jobConf.incrementalRead.lastValue));
+          ps.setBigDecimal(2, new BigDecimal(incrementalMaxValue));
+        }
       }
 
       rs = ps.executeQuery();

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/main/java/org/apache/sqoop/test/data/Cities.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/sqoop/test/data/Cities.java b/test/src/main/java/org/apache/sqoop/test/data/Cities.java
index fbbd7ef..1703397 100644
--- a/test/src/main/java/org/apache/sqoop/test/data/Cities.java
+++ b/test/src/main/java/org/apache/sqoop/test/data/Cities.java
@@ -20,6 +20,8 @@ package org.apache.sqoop.test.data;
 import org.apache.sqoop.common.test.db.DatabaseProvider;
 import org.apache.sqoop.common.test.db.TableName;
 
+import java.sql.Timestamp;
+
 /**
  * Simple listing of few world's cities to do basic sanity tests.
  */
@@ -36,7 +38,7 @@ public class Cities extends DataSet {
       "id",
       "id", "int",
       "country", "varchar(50)",
-      "some_date", "date",
+      "some_date", "timestamp",
       "city", "varchar(50)"
     );
 
@@ -45,10 +47,10 @@ public class Cities extends DataSet {
 
   @Override
   public DataSet loadBasicData() {
-    provider.insertRow(tableBaseName, 1, "USA", "2004-10-23","San Francisco");
-    provider.insertRow(tableBaseName, 2, "USA", "2004-10-24", "Sunnyvale");
-    provider.insertRow(tableBaseName, 3, "Czech Republic", "2004-10-25", "Brno");
-    provider.insertRow(tableBaseName, 4, "USA", "2004-10-26", "Palo Alto");
+    provider.insertRow(tableBaseName, 1, "USA", Timestamp.valueOf("2004-10-23 00:00:00.000"),"San Francisco");
+    provider.insertRow(tableBaseName, 2, "USA", Timestamp.valueOf("2004-10-24 00:00:00.000"), "Sunnyvale");
+    provider.insertRow(tableBaseName, 3, "Czech Republic", Timestamp.valueOf("2004-10-25 00:00:00.000"), "Brno");
+    provider.insertRow(tableBaseName, 4, "USA", Timestamp.valueOf("2004-10-26 00:00:00.000"), "Palo Alto");
 
     return this;
   }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/main/java/org/apache/sqoop/test/data/UbuntuReleases.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/sqoop/test/data/UbuntuReleases.java b/test/src/main/java/org/apache/sqoop/test/data/UbuntuReleases.java
index 12bcad1..9b218e9 100644
--- a/test/src/main/java/org/apache/sqoop/test/data/UbuntuReleases.java
+++ b/test/src/main/java/org/apache/sqoop/test/data/UbuntuReleases.java
@@ -20,10 +20,12 @@ package org.apache.sqoop.test.data;
 import org.apache.sqoop.common.test.db.DatabaseProvider;
 import org.apache.sqoop.common.test.db.TableName;
 
+import java.sql.Timestamp;
+
 /**
  * Releases of Ubuntu Linux.
  *
- * Purpose of this set is to cover most common data types (varchar, int, decimal, date, boolean).
+ * Purpose of this set is to cover most common data types (varchar, int, decimal, timestamp).
  */
 public class UbuntuReleases extends DataSet {
 
@@ -38,8 +40,8 @@ public class UbuntuReleases extends DataSet {
       "id",
       "id", "int",
       "code_name", "varchar(64)",
-      "version", "decimal(4,2)",
-      "release_date", "date"
+      "version", "numeric(4,2)",
+      "release_date", "timestamp"
     );
 
     return this;
@@ -47,25 +49,25 @@ public class UbuntuReleases extends DataSet {
 
   @Override
   public DataSet loadBasicData() {
-    provider.insertRow(tableBaseName,  1, "Warty Warthog",    4.10,  "2004-10-20");
-    provider.insertRow(tableBaseName,  2, "Hoary Hedgehog",   5.04,  "2005-04-08");
-    provider.insertRow(tableBaseName,  3, "Breezy Badger",    5.10,  "2005-10-13");
-    provider.insertRow(tableBaseName,  4, "Dapper Drake",     6.06,  "2006-06-01");
-    provider.insertRow(tableBaseName,  5, "Edgy Eft",         6.10,  "2006-10-26");
-    provider.insertRow(tableBaseName,  6, "Feisty Fawn",      7.04,  "2007-04-19");
-    provider.insertRow(tableBaseName,  7, "Gutsy Gibbon",     7.10,  "2007-10-18");
-    provider.insertRow(tableBaseName,  8, "Hardy Heron",      8.04,  "2008-04-24");
-    provider.insertRow(tableBaseName,  9, "Intrepid Ibex",    8.10,  "2008-10-18");
-    provider.insertRow(tableBaseName, 10, "Jaunty Jackalope", 9.04,  "2009-04-23");
-    provider.insertRow(tableBaseName, 11, "Karmic Koala",     9.10,  "2009-10-29");
-    provider.insertRow(tableBaseName, 12, "Lucid Lynx",      10.04,  "2010-04-29");
-    provider.insertRow(tableBaseName, 13, "Maverick Meerkat",10.10,  "2010-10-10");
-    provider.insertRow(tableBaseName, 14, "Natty Narwhal",   11.04,  "2011-04-28");
-    provider.insertRow(tableBaseName, 15, "Oneiric Ocelot",  11.10,  "2011-10-10");
-    provider.insertRow(tableBaseName, 16, "Precise Pangolin",12.04,  "2012-04-26");
-    provider.insertRow(tableBaseName, 17, "Quantal Quetzal", 12.10,  "2012-10-18");
-    provider.insertRow(tableBaseName, 18, "Raring Ringtail", 13.04,  "2013-04-25");
-    provider.insertRow(tableBaseName, 19, "Saucy Salamander",13.10,  "2013-10-17");
+    provider.insertRow(tableBaseName,  1, "Warty Warthog",    4.10,  Timestamp.valueOf("2004-10-20 00:00:00"));
+    provider.insertRow(tableBaseName,  2, "Hoary Hedgehog",   5.04,  Timestamp.valueOf("2005-04-08 00:00:00"));
+    provider.insertRow(tableBaseName,  3, "Breezy Badger",    5.10,  Timestamp.valueOf("2005-10-13 00:00:00"));
+    provider.insertRow(tableBaseName,  4, "Dapper Drake",     6.06,  Timestamp.valueOf("2006-06-01 00:00:00"));
+    provider.insertRow(tableBaseName,  5, "Edgy Eft",         6.10,  Timestamp.valueOf("2006-10-26 00:00:00"));
+    provider.insertRow(tableBaseName,  6, "Feisty Fawn",      7.04,  Timestamp.valueOf("2007-04-19 00:00:00"));
+    provider.insertRow(tableBaseName,  7, "Gutsy Gibbon",     7.10,  Timestamp.valueOf("2007-10-18 00:00:00"));
+    provider.insertRow(tableBaseName,  8, "Hardy Heron",      8.04,  Timestamp.valueOf("2008-04-24 00:00:00"));
+    provider.insertRow(tableBaseName,  9, "Intrepid Ibex",    8.10,  Timestamp.valueOf("2008-10-18 00:00:00"));
+    provider.insertRow(tableBaseName, 10, "Jaunty Jackalope", 9.04,  Timestamp.valueOf("2009-04-23 00:00:00"));
+    provider.insertRow(tableBaseName, 11, "Karmic Koala",     9.10,  Timestamp.valueOf("2009-10-29 00:00:00"));
+    provider.insertRow(tableBaseName, 12, "Lucid Lynx",      10.04,  Timestamp.valueOf("2010-04-29 00:00:00"));
+    provider.insertRow(tableBaseName, 13, "Maverick Meerkat",10.10,  Timestamp.valueOf("2010-10-10 00:00:00"));
+    provider.insertRow(tableBaseName, 14, "Natty Narwhal",   11.04,  Timestamp.valueOf("2011-04-28 00:00:00"));
+    provider.insertRow(tableBaseName, 15, "Oneiric Ocelot",  11.10,  Timestamp.valueOf("2011-10-10 00:00:00"));
+    provider.insertRow(tableBaseName, 16, "Precise Pangolin",12.04,  Timestamp.valueOf("2012-04-26 00:00:00"));
+    provider.insertRow(tableBaseName, 17, "Quantal Quetzal", 12.10,  Timestamp.valueOf("2012-10-18 00:00:00"));
+    provider.insertRow(tableBaseName, 18, "Raring Ringtail", 13.04,  Timestamp.valueOf("2013-04-25 00:00:00"));
+    provider.insertRow(tableBaseName, 19, "Saucy Salamander",13.10,  Timestamp.valueOf("2013-10-17 00:00:00"));
 
     return this;
   }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/main/java/org/apache/sqoop/test/infrastructure/SqoopTestCase.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/sqoop/test/infrastructure/SqoopTestCase.java b/test/src/main/java/org/apache/sqoop/test/infrastructure/SqoopTestCase.java
index c1f355f..47f1e45 100644
--- a/test/src/main/java/org/apache/sqoop/test/infrastructure/SqoopTestCase.java
+++ b/test/src/main/java/org/apache/sqoop/test/infrastructure/SqoopTestCase.java
@@ -399,16 +399,6 @@ public class SqoopTestCase implements ITest {
   }
 
   /**
-   * Insert row into table for this test.
-   * @param escapeValues
-   * @param values
-   */
-  public void insertRow(Boolean escapeValues, Object ...values) {
-    getInfrastructureProvider(DatabaseInfrastructureProvider.class).getInstance()
-        .insertRow(getTableName(), escapeValues, values);
-  }
-
-  /**
    * Fetch row count of table for this test.
    * @return long count
    */

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/main/java/org/apache/sqoop/test/testcases/ConnectorTestCase.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/sqoop/test/testcases/ConnectorTestCase.java b/test/src/main/java/org/apache/sqoop/test/testcases/ConnectorTestCase.java
index c843448..378c1f3 100644
--- a/test/src/main/java/org/apache/sqoop/test/testcases/ConnectorTestCase.java
+++ b/test/src/main/java/org/apache/sqoop/test/testcases/ConnectorTestCase.java
@@ -48,7 +48,7 @@ import org.testng.annotations.BeforeSuite;
  * the database provider prior every test execution.
  */
 @edu.umd.cs.findbugs.annotations.SuppressWarnings({"MS_PKGPROTECT", "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD"})
-abstract public class ConnectorTestCase extends JettyTestCase {
+abstract public class  ConnectorTestCase extends JettyTestCase {
 
   private static final Logger LOG = Logger.getLogger(ConnectorTestCase.class);
 
@@ -103,10 +103,6 @@ abstract public class ConnectorTestCase extends JettyTestCase {
     provider.insertRow(getTableName(), values);
   }
 
-  protected void insertRow(Boolean escapeValues, Object ...values) {
-    provider.insertRow(getTableName(), escapeValues, values);
-  }
-
   protected long rowCount() {
     return provider.rowCount(getTableName());
   }
@@ -228,17 +224,6 @@ abstract public class ConnectorTestCase extends JettyTestCase {
   }
 
   /**
-   * Assert row in testing table.
-   *
-   * @param conditions Conditions in config that are expected by the database provider
-   * @param escapeValues Flag whether the values should be escaped based on their type when using in the generated queries or not
-   * @param values Values that are expected in the table (with corresponding types)
-   */
-  protected void assertRow(Object []conditions, Boolean escapeValues, Object ...values) {
-    ProviderAsserts.assertRow(provider, getTableName(), escapeValues, conditions, values);
-  }
-
-  /**
    * Assert row in table "cities".
    *
    * @param values Values that are expected

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/AppendModeTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/AppendModeTest.java b/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/AppendModeTest.java
index 8c65898..fa660d5 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/AppendModeTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/AppendModeTest.java
@@ -60,23 +60,23 @@ public class AppendModeTest extends ConnectorTestCase {
     // First execution
     executeJob(job);
     assertTo(
-      "1,'USA','2004-10-23','San Francisco'",
-      "2,'USA','2004-10-24','Sunnyvale'",
-      "3,'Czech Republic','2004-10-25','Brno'",
-      "4,'USA','2004-10-26','Palo Alto'"
+      "1,'USA','2004-10-23 00:00:00.000','San Francisco'",
+      "2,'USA','2004-10-24 00:00:00.000','Sunnyvale'",
+      "3,'Czech Republic','2004-10-25 00:00:00.000','Brno'",
+      "4,'USA','2004-10-26 00:00:00.000','Palo Alto'"
     );
 
     // Second execution
     executeJob(job);
     assertTo(
-      "1,'USA','2004-10-23','San Francisco'",
-      "2,'USA','2004-10-24','Sunnyvale'",
-      "3,'Czech Republic','2004-10-25','Brno'",
-      "4,'USA','2004-10-26','Palo Alto'",
-      "1,'USA','2004-10-23','San Francisco'",
-      "2,'USA','2004-10-24','Sunnyvale'",
-      "3,'Czech Republic','2004-10-25','Brno'",
-      "4,'USA','2004-10-26','Palo Alto'"
+      "1,'USA','2004-10-23 00:00:00.000','San Francisco'",
+      "2,'USA','2004-10-24 00:00:00.000','Sunnyvale'",
+      "3,'Czech Republic','2004-10-25 00:00:00.000','Brno'",
+      "4,'USA','2004-10-26 00:00:00.000','Palo Alto'",
+      "1,'USA','2004-10-23 00:00:00.000','San Francisco'",
+      "2,'USA','2004-10-24 00:00:00.000','Sunnyvale'",
+      "3,'Czech Republic','2004-10-25 00:00:00.000','Brno'",
+      "4,'USA','2004-10-26 00:00:00.000','Palo Alto'"
     );
 
     dropTable();

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/FromHDFSToHDFSTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/FromHDFSToHDFSTest.java b/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/FromHDFSToHDFSTest.java
index c39c8d6..c953131 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/FromHDFSToHDFSTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/FromHDFSToHDFSTest.java
@@ -35,10 +35,10 @@ public class FromHDFSToHDFSTest extends ConnectorTestCase {
   @Test
   public void test() throws Exception {
     String[] sampleData = new String[]{
-      "1,'USA','2004-10-23','San Francisco'",
-      "2,'USA','2004-10-24','Sunnyvale'",
-      "3,'Czech Republic','2004-10-25','Brno'",
-      "4,'USA','2004-10-26','Palo Alto'"
+      "1,'USA','2004-10-23 00:00:00.000','San Francisco'",
+      "2,'USA','2004-10-24 00:00:00.000','Sunnyvale'",
+      "3,'Czech Republic','2004-10-25 00:00:00.000','Brno'",
+      "4,'USA','2004-10-26 00:00:00.000','Palo Alto'"
     };
 
     createFromFile("input-0001", sampleData);

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/HdfsIncrementalReadTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/HdfsIncrementalReadTest.java b/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/HdfsIncrementalReadTest.java
index e6f6e0d..d48c6d2 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/HdfsIncrementalReadTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/HdfsIncrementalReadTest.java
@@ -25,6 +25,8 @@ import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
+import java.sql.Timestamp;
+
 import static org.testng.Assert.assertEquals;
 
 public class HdfsIncrementalReadTest extends ConnectorTestCase {
@@ -42,7 +44,7 @@ public class HdfsIncrementalReadTest extends ConnectorTestCase {
   @Test
   public void testBasic() throws Exception {
     createFromFile("input-0001",
-        "1,'USA','2004-10-23','San Francisco'"
+      "1,'USA','2004-10-23 00:00:00.000','San Francisco'"
     );
 
     // RDBMS link
@@ -65,29 +67,29 @@ public class HdfsIncrementalReadTest extends ConnectorTestCase {
     // Execute for the first time
     executeJob(job);
     assertEquals(provider.rowCount(getTableName()), 1);
-    assertRowInCities(1, "USA", "2004-10-23", "San Francisco");
+    assertRowInCities(1, "USA", Timestamp.valueOf("2004-10-23 00:00:00.000"), "San Francisco");
 
     // Second execution
     createFromFile("input-0002",
-      "2,'USA','2004-10-24','Sunnyvale'",
-      "3,'Czech Republic','2004-10-25','Brno'"
+      "2,'USA','2004-10-24 00:00:00.000','Sunnyvale'",
+      "3,'Czech Republic','2004-10-25 00:00:00.000','Brno'"
     );
     executeJob(job);
     assertEquals(provider.rowCount(getTableName()), 3);
-    assertRowInCities(1, "USA", "2004-10-23", "San Francisco");
-    assertRowInCities(2, "USA", "2004-10-24", "Sunnyvale");
-    assertRowInCities(3, "Czech Republic", "2004-10-25", "Brno");
+    assertRowInCities(1, "USA", Timestamp.valueOf("2004-10-23 00:00:00.000"), "San Francisco");
+    assertRowInCities(2, "USA", Timestamp.valueOf("2004-10-24 00:00:00.000"), "Sunnyvale");
+    assertRowInCities(3, "Czech Republic", Timestamp.valueOf("2004-10-25 00:00:00.000"), "Brno");
 
     // And last execution
     createFromFile("input-0003",
-      "4,'USA','2004-10-26','Palo Alto'"
+      "4,'USA','2004-10-26 00:00:00.000','Palo Alto'"
     );
     executeJob(job);
     assertEquals(provider.rowCount(getTableName()), 4);
-    assertRowInCities(1, "USA", "2004-10-23", "San Francisco");
-    assertRowInCities(2, "USA", "2004-10-24", "Sunnyvale");
-    assertRowInCities(3, "Czech Republic", "2004-10-25", "Brno");
-    assertRowInCities(4, "USA", "2004-10-26", "Palo Alto");
+    assertRowInCities(1, "USA", Timestamp.valueOf("2004-10-23 00:00:00.000"), "San Francisco");
+    assertRowInCities(2, "USA", Timestamp.valueOf("2004-10-24 00:00:00.000"), "Sunnyvale");
+    assertRowInCities(3, "Czech Republic", Timestamp.valueOf("2004-10-25 00:00:00.000"), "Brno");
+    assertRowInCities(4, "USA", Timestamp.valueOf("2004-10-26 00:00:00.000"), "Palo Alto");
   }
 
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/InformalJobNameExecuteTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/InformalJobNameExecuteTest.java b/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/InformalJobNameExecuteTest.java
index 411b07e..cd2ed6c 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/InformalJobNameExecuteTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/InformalJobNameExecuteTest.java
@@ -24,6 +24,8 @@ import org.apache.sqoop.model.MLink;
 import org.apache.sqoop.test.testcases.ConnectorTestCase;
 import org.testng.annotations.*;
 
+import java.sql.Timestamp;
+
 import static org.testng.Assert.assertEquals;
 
 public class InformalJobNameExecuteTest extends ConnectorTestCase {
@@ -54,8 +56,8 @@ public class InformalJobNameExecuteTest extends ConnectorTestCase {
   @Test
   public void test() throws Exception {
     createFromFile("input-0001",
-            "1,'USA','2004-10-23','San Francisco'",
-            "2,'USA','2004-10-24','Sunnyvale'"
+      "1,'USA','2004-10-23 00:00:00.000','San Francisco'",
+      "2,'USA','2004-10-24 00:00:00.000','Sunnyvale'"
     );
 
     // RDBMS link
@@ -86,7 +88,7 @@ public class InformalJobNameExecuteTest extends ConnectorTestCase {
     executeJob(job);
 
     assertEquals(2L, provider.rowCount(getTableName()));
-    assertRowInCities(1, "USA", "2004-10-23", "San Francisco");
-    assertRowInCities(2, "USA", "2004-10-24", "Sunnyvale");
+    assertRowInCities(1, "USA", Timestamp.valueOf("2004-10-23 00:00:00.000"), "San Francisco");
+    assertRowInCities(2, "USA", Timestamp.valueOf("2004-10-24 00:00:00.000"), "Sunnyvale");
   }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/OutputDirectoryTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/OutputDirectoryTest.java b/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/OutputDirectoryTest.java
index 1790f96..2759b42 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/OutputDirectoryTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/OutputDirectoryTest.java
@@ -139,10 +139,10 @@ public class OutputDirectoryTest extends ConnectorTestCase {
 
     // Assert correct output
     assertTo(
-      "1,'USA','2004-10-23','San Francisco'",
-      "2,'USA','2004-10-24','Sunnyvale'",
-      "3,'Czech Republic','2004-10-25','Brno'",
-      "4,'USA','2004-10-26','Palo Alto'"
+      "1,'USA','2004-10-23 00:00:00.000','San Francisco'",
+      "2,'USA','2004-10-24 00:00:00.000','Sunnyvale'",
+      "3,'Czech Republic','2004-10-25 00:00:00.000','Brno'",
+      "4,'USA','2004-10-26 00:00:00.000','Palo Alto'"
     );
 
     dropTable();

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/AllTypesTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/AllTypesTest.java b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/AllTypesTest.java
index 5053b56..ac5a61a 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/AllTypesTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/AllTypesTest.java
@@ -80,7 +80,7 @@ public class AllTypesTest extends ConnectorTestCase implements ITest {
 
     int i = 1;
     for(ExampleValue value: type.values) {
-      insertRow(false, Integer.toString(i++), value.getInsertStatement());
+      insertRow(i++, value.getObjectValue());
     }
 
     // RDBMS link
@@ -156,8 +156,7 @@ public class AllTypesTest extends ConnectorTestCase implements ITest {
     assertEquals(type.values.size(), rowCount());
     for(ExampleValue value : type.values) {
       assertRow(
-        new Object[] {"value", value.getInsertStatement()},
-        false,
+        new Object[] {"value", value.getObjectValue()},
         value.getObjectValue());
     }
 

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/FromHDFSToRDBMSTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/FromHDFSToRDBMSTest.java b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/FromHDFSToRDBMSTest.java
index 25cdb68..07eaba1 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/FromHDFSToRDBMSTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/FromHDFSToRDBMSTest.java
@@ -28,6 +28,8 @@ import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
+import java.sql.Timestamp;
+
 import static org.testng.Assert.assertEquals;
 
 /**
@@ -47,12 +49,11 @@ public class FromHDFSToRDBMSTest extends ConnectorTestCase {
   @Test
   public void testBasic() throws Exception {
     createFromFile("input-0001",
-        "1,'USA','2004-10-23','San Francisco'",
-        "2,'USA','2004-10-24','Sunnyvale'",
-        "3,'Czech Republic','2004-10-25','Brno'",
-        "4,'USA','2004-10-26','Palo Alto'"
+      "1,'USA','2004-10-23 00:00:00.000','San Francisco'",
+      "2,'USA','2004-10-24 00:00:00.000','Sunnyvale'",
+      "3,'Czech Republic','2004-10-25 00:00:00.000','Brno'",
+      "4,'USA','2004-10-26 00:00:00.000','Palo Alto'"
     );
-
     // RDBMS link
     MLink rdbmsLink = getClient().createLink("generic-jdbc-connector");
     fillRdbmsLinkConfig(rdbmsLink);
@@ -80,9 +81,9 @@ public class FromHDFSToRDBMSTest extends ConnectorTestCase {
     executeJob(job);
 
     assertEquals(4L, provider.rowCount(getTableName()));
-    assertRowInCities(1, "USA", "2004-10-23", "San Francisco");
-    assertRowInCities(2, "USA", "2004-10-24", "Sunnyvale");
-    assertRowInCities(3, "Czech Republic", "2004-10-25", "Brno");
-    assertRowInCities(4, "USA", "2004-10-26", "Palo Alto");
+    assertRowInCities(1, "USA", Timestamp.valueOf("2004-10-23 00:00:00.000"), "San Francisco");
+    assertRowInCities(2, "USA", Timestamp.valueOf("2004-10-24 00:00:00.000"), "Sunnyvale");
+    assertRowInCities(3, "Czech Republic", Timestamp.valueOf("2004-10-25 00:00:00.000"), "Brno");
+    assertRowInCities(4, "USA", Timestamp.valueOf("2004-10-26 00:00:00.000"), "Palo Alto");
   }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/FromRDBMSToHDFSTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/FromRDBMSToHDFSTest.java b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/FromRDBMSToHDFSTest.java
index 686572a..4cb0edc 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/FromRDBMSToHDFSTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/FromRDBMSToHDFSTest.java
@@ -64,10 +64,10 @@ public class FromRDBMSToHDFSTest extends ConnectorTestCase {
 
     // Assert correct output
     assertTo(
-      "1,'USA','2004-10-23','San Francisco'",
-      "2,'USA','2004-10-24','Sunnyvale'",
-      "3,'Czech Republic','2004-10-25','Brno'",
-      "4,'USA','2004-10-26','Palo Alto'"
+      "1,'USA','2004-10-23 00:00:00.000','San Francisco'",
+      "2,'USA','2004-10-24 00:00:00.000','Sunnyvale'",
+      "3,'Czech Republic','2004-10-25 00:00:00.000','Brno'",
+      "4,'USA','2004-10-26 00:00:00.000','Palo Alto'"
     );
 
     // Clean up testing table
@@ -283,10 +283,10 @@ public class FromRDBMSToHDFSTest extends ConnectorTestCase {
 
     // Assert correct output
     assertTo(
-            "1,'USA','2004-10-23','San Francisco'",
-            "2,'USA','2004-10-24','Sunnyvale'",
-            "3,'Czech Republic','2004-10-25','Brno'",
-            "4,'USA','2004-10-26','Palo Alto'"
+      "1,'USA','2004-10-23 00:00:00.000','San Francisco'",
+      "2,'USA','2004-10-24 00:00:00.000','Sunnyvale'",
+      "3,'Czech Republic','2004-10-25 00:00:00.000','Brno'",
+      "4,'USA','2004-10-26 00:00:00.000','Palo Alto'"
     );
 
     // Clean up testing table

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/IncrementalReadTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/IncrementalReadTest.java b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/IncrementalReadTest.java
index f850768..0c04fd9 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/IncrementalReadTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/IncrementalReadTest.java
@@ -41,10 +41,10 @@ import static org.testng.Assert.assertEquals;
 public class IncrementalReadTest extends ConnectorTestCase implements ITest {
 
   public static Object[] COLUMNS = new Object [][] {
-    //       column -   last value - new max value
-    {          "id",          "9",         "19"},
-    {     "version",       "8.10",      "13.10"},
-    {"release_date", "2008-10-18", "2013-10-17"},
+    //       column -                last value -               new max value
+    {          "id",                         "9",                        "19"},
+    {     "version",                      "8.10",                     "13.10"},
+    {"release_date",     "2008-10-18 00:00:00.0",     "2013-10-17 00:00:00.0"},
   };
 
   private static String testName;
@@ -113,17 +113,17 @@ public class IncrementalReadTest extends ConnectorTestCase implements ITest {
 
     // Assert correct output
     assertTo(
-        "10,'Jaunty Jackalope',9.04,'2009-04-23'",
-        "11,'Karmic Koala',9.10,'2009-10-29'",
-        "12,'Lucid Lynx',10.04,'2010-04-29'",
-        "13,'Maverick Meerkat',10.10,'2010-10-10'",
-        "14,'Natty Narwhal',11.04,'2011-04-28'",
-        "15,'Oneiric Ocelot',11.10,'2011-10-10'",
-        "16,'Precise Pangolin',12.04,'2012-04-26'",
-        "17,'Quantal Quetzal',12.10,'2012-10-18'",
-        "18,'Raring Ringtail',13.04,'2013-04-25'",
-        "19,'Saucy Salamander',13.10,'2013-10-17'"
-      );
+      "10,'Jaunty Jackalope',9.04,'2009-04-23 00:00:00.000'",
+      "11,'Karmic Koala',9.10,'2009-10-29 00:00:00.000'",
+      "12,'Lucid Lynx',10.04,'2010-04-29 00:00:00.000'",
+      "13,'Maverick Meerkat',10.10,'2010-10-10 00:00:00.000'",
+      "14,'Natty Narwhal',11.04,'2011-04-28 00:00:00.000'",
+      "15,'Oneiric Ocelot',11.10,'2011-10-10 00:00:00.000'",
+      "16,'Precise Pangolin',12.04,'2012-04-26 00:00:00.000'",
+      "17,'Quantal Quetzal',12.10,'2012-10-18 00:00:00.000'",
+      "18,'Raring Ringtail',13.04,'2013-04-25 00:00:00.000'",
+      "19,'Saucy Salamander',13.10,'2013-10-17 00:00:00.000'"
+    );
 
     // Verify new last value
     MJob updatedJob = getClient().getJob(job.getName());
@@ -168,17 +168,17 @@ public class IncrementalReadTest extends ConnectorTestCase implements ITest {
 
     // Assert correct output
     assertTo(
-        "10,'Jaunty Jackalope',9.04,'2009-04-23'",
-        "11,'Karmic Koala',9.10,'2009-10-29'",
-        "12,'Lucid Lynx',10.04,'2010-04-29'",
-        "13,'Maverick Meerkat',10.10,'2010-10-10'",
-        "14,'Natty Narwhal',11.04,'2011-04-28'",
-        "15,'Oneiric Ocelot',11.10,'2011-10-10'",
-        "16,'Precise Pangolin',12.04,'2012-04-26'",
-        "17,'Quantal Quetzal',12.10,'2012-10-18'",
-        "18,'Raring Ringtail',13.04,'2013-04-25'",
-        "19,'Saucy Salamander',13.10,'2013-10-17'"
-      );
+      "10,'Jaunty Jackalope',9.04,'2009-04-23 00:00:00.000'",
+      "11,'Karmic Koala',9.10,'2009-10-29 00:00:00.000'",
+      "12,'Lucid Lynx',10.04,'2010-04-29 00:00:00.000'",
+      "13,'Maverick Meerkat',10.10,'2010-10-10 00:00:00.000'",
+      "14,'Natty Narwhal',11.04,'2011-04-28 00:00:00.000'",
+      "15,'Oneiric Ocelot',11.10,'2011-10-10 00:00:00.000'",
+      "16,'Precise Pangolin',12.04,'2012-04-26 00:00:00.000'",
+      "17,'Quantal Quetzal',12.10,'2012-10-18 00:00:00.000'",
+      "18,'Raring Ringtail',13.04,'2013-04-25 00:00:00.000'",
+      "19,'Saucy Salamander',13.10,'2013-10-17 00:00:00.000'"
+    );
 
     // Verify new last value
     MJob updatedJob = getClient().getJob(job.getName());

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/PartitionerTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/PartitionerTest.java b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/PartitionerTest.java
index 42bff65..8129c6a 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/PartitionerTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/PartitionerTest.java
@@ -110,26 +110,26 @@ public class PartitionerTest extends ConnectorTestCase implements ITest {
     // Assert correct output
     assertToFiles((extractors > maxOutputFiles) ? maxOutputFiles : extractors);
     assertTo(
-        "1,'Warty Warthog',4.10,'2004-10-20'",
-        "2,'Hoary Hedgehog',5.04,'2005-04-08'",
-        "3,'Breezy Badger',5.10,'2005-10-13'",
-        "4,'Dapper Drake',6.06,'2006-06-01'",
-        "5,'Edgy Eft',6.10,'2006-10-26'",
-        "6,'Feisty Fawn',7.04,'2007-04-19'",
-        "7,'Gutsy Gibbon',7.10,'2007-10-18'",
-        "8,'Hardy Heron',8.04,'2008-04-24'",
-        "9,'Intrepid Ibex',8.10,'2008-10-18'",
-        "10,'Jaunty Jackalope',9.04,'2009-04-23'",
-        "11,'Karmic Koala',9.10,'2009-10-29'",
-        "12,'Lucid Lynx',10.04,'2010-04-29'",
-        "13,'Maverick Meerkat',10.10,'2010-10-10'",
-        "14,'Natty Narwhal',11.04,'2011-04-28'",
-        "15,'Oneiric Ocelot',11.10,'2011-10-10'",
-        "16,'Precise Pangolin',12.04,'2012-04-26'",
-        "17,'Quantal Quetzal',12.10,'2012-10-18'",
-        "18,'Raring Ringtail',13.04,'2013-04-25'",
-        "19,'Saucy Salamander',13.10,'2013-10-17'"
-      );
+      "1,'Warty Warthog',4.10,'2004-10-20 00:00:00.000'",
+      "2,'Hoary Hedgehog',5.04,'2005-04-08 00:00:00.000'",
+      "3,'Breezy Badger',5.10,'2005-10-13 00:00:00.000'",
+      "4,'Dapper Drake',6.06,'2006-06-01 00:00:00.000'",
+      "5,'Edgy Eft',6.10,'2006-10-26 00:00:00.000'",
+      "6,'Feisty Fawn',7.04,'2007-04-19 00:00:00.000'",
+      "7,'Gutsy Gibbon',7.10,'2007-10-18 00:00:00.000'",
+      "8,'Hardy Heron',8.04,'2008-04-24 00:00:00.000'",
+      "9,'Intrepid Ibex',8.10,'2008-10-18 00:00:00.000'",
+      "10,'Jaunty Jackalope',9.04,'2009-04-23 00:00:00.000'",
+      "11,'Karmic Koala',9.10,'2009-10-29 00:00:00.000'",
+      "12,'Lucid Lynx',10.04,'2010-04-29 00:00:00.000'",
+      "13,'Maverick Meerkat',10.10,'2010-10-10 00:00:00.000'",
+      "14,'Natty Narwhal',11.04,'2011-04-28 00:00:00.000'",
+      "15,'Oneiric Ocelot',11.10,'2011-10-10 00:00:00.000'",
+      "16,'Precise Pangolin',12.04,'2012-04-26 00:00:00.000'",
+      "17,'Quantal Quetzal',12.10,'2012-10-18 00:00:00.000'",
+      "18,'Raring Ringtail',13.04,'2013-04-25 00:00:00.000'",
+      "19,'Saucy Salamander',13.10,'2013-10-17 00:00:00.000'"
+    );
 
     // Clean up testing table
     dropTable();

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableStagedRDBMSTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableStagedRDBMSTest.java b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableStagedRDBMSTest.java
index 68dc65e..2565c3f 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableStagedRDBMSTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableStagedRDBMSTest.java
@@ -28,6 +28,8 @@ import org.apache.sqoop.test.data.Cities;
 import org.apache.sqoop.test.testcases.ConnectorTestCase;
 import org.testng.annotations.Test;
 
+import java.sql.Timestamp;
+
 /**
  *
  */
@@ -38,11 +40,11 @@ public class TableStagedRDBMSTest extends ConnectorTestCase {
     final TableName stageTableName = new TableName("STAGE_" + getTableName());
     createTableCities();
     createFromFile("input-0001",
-        "1,'USA','2004-10-23','San Francisco'",
-        "2,'USA','2004-10-24','Sunnyvale'",
-        "3,'Czech Republic','2004-10-25','Brno'",
-        "4,'USA','2004-10-26','Palo Alto'"
-      );
+      "1,'USA','2004-10-23 00:00:00.000','San Francisco'",
+      "2,'USA','2004-10-24 00:00:00.000','Sunnyvale'",
+      "3,'Czech Republic','2004-10-25 00:00:00.000','Brno'",
+      "4,'USA','2004-10-26 00:00:00.000','Palo Alto'"
+    );
     new Cities(provider, stageTableName).createTables();
 
     // RDBMS link
@@ -77,10 +79,10 @@ public class TableStagedRDBMSTest extends ConnectorTestCase {
 
     assertEquals(0L, provider.rowCount(stageTableName));
     assertEquals(4L, provider.rowCount(getTableName()));
-    assertRowInCities(1, "USA", "2004-10-23", "San Francisco");
-    assertRowInCities(2, "USA", "2004-10-24", "Sunnyvale");
-    assertRowInCities(3, "Czech Republic", "2004-10-25", "Brno");
-    assertRowInCities(4, "USA", "2004-10-26", "Palo Alto");
+    assertRowInCities(1, "USA", Timestamp.valueOf("2004-10-23 00:00:00.000"), "San Francisco");
+    assertRowInCities(2, "USA", Timestamp.valueOf("2004-10-24 00:00:00.000"), "Sunnyvale");
+    assertRowInCities(3, "Czech Republic", Timestamp.valueOf("2004-10-25 00:00:00.000"), "Brno");
+    assertRowInCities(4, "USA", Timestamp.valueOf("2004-10-26 00:00:00.000"), "Palo Alto");
 
     // Clean up testing table
     provider.dropTable(stageTableName);

http://git-wip-us.apache.org/repos/asf/sqoop/blob/16c2cdca/test/src/test/java/org/apache/sqoop/integration/connector/kafka/FromRDBMSToKafkaTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/kafka/FromRDBMSToKafkaTest.java b/test/src/test/java/org/apache/sqoop/integration/connector/kafka/FromRDBMSToKafkaTest.java
index 4ecb018..a34378a 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/kafka/FromRDBMSToKafkaTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/kafka/FromRDBMSToKafkaTest.java
@@ -29,10 +29,10 @@ import org.testng.annotations.Test;
 public class FromRDBMSToKafkaTest extends KafkaConnectorTestCase {
 
   private static final String[] input = {
-          "1,'USA','2004-10-23','San Francisco'",
-          "2,'USA','2004-10-24','Sunnyvale'",
-          "3,'Czech Republic','2004-10-25','Brno'",
-          "4,'USA','2004-10-26','Palo Alto'"
+    "1,'USA','2004-10-23 00:00:00.000','San Francisco'",
+    "2,'USA','2004-10-24 00:00:00.000','Sunnyvale'",
+    "3,'Czech Republic','2004-10-25 00:00:00.000','Brno'",
+    "4,'USA','2004-10-26 00:00:00.000','Palo Alto'"
   };
 
   @Test


Mime
View raw message