Repository: sqoop Updated Branches: refs/heads/sqoop2 71ae5e2cd -> 0c06e8b0b
SQOOP-2198: Sqoop2: Datatypes: Add boolean/char/date support to DerbyTypeList (Jarek Jarcec Cecho via Abraham Elmahrek) Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/0c06e8b0 Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/0c06e8b0 Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/0c06e8b0 Branch: refs/heads/sqoop2 Commit: 0c06e8b0b92aad023dab72c9be28e27ca5650358 Parents: 71ae5e2 Author: Abraham Elmahrek <[email protected]> Authored: Thu Mar 19 16:31:17 2015 -0700 Committer: Abraham Elmahrek <[email protected]> Committed: Thu Mar 19 16:31:17 2015 -0700 ---------------------------------------------------------------------- .../common/test/db/types/DerbyTypeList.java | 27 +++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/sqoop/blob/0c06e8b0/common-test/src/main/java/org/apache/sqoop/common/test/db/types/DerbyTypeList.java ---------------------------------------------------------------------- diff --git a/common-test/src/main/java/org/apache/sqoop/common/test/db/types/DerbyTypeList.java b/common-test/src/main/java/org/apache/sqoop/common/test/db/types/DerbyTypeList.java index 49778cb..1d4445a 100644 --- a/common-test/src/main/java/org/apache/sqoop/common/test/db/types/DerbyTypeList.java +++ b/common-test/src/main/java/org/apache/sqoop/common/test/db/types/DerbyTypeList.java @@ -81,11 +81,32 @@ public class DerbyTypeList extends DatabaseTypeList { .addExample( "999.99", new BigDecimal(999.99).setScale(2, RoundingMode.FLOOR), "999.99") .build()); - // BLOB // Boolean - // Char - // CLOB + add(DatabaseType.builder("BOOLEAN") + .addExample( "true", Boolean.TRUE, "true") + .addExample("false", Boolean.FALSE, "false") + .build()); + + // String types + add(DatabaseType.builder("VARCHAR(5)") + .addExample("'A'", "A", "'A'") + .addExample("''", "", "''") + .addExample("''''", "'", "'\\\''") + .addExample("'\"'", "\"", "'\\\"'") + .build()); + add(DatabaseType.builder("CHAR(5)") + .addExample("'A'", "A ", "'A '") + .addExample( "''", " ", "' '") + .build()); + // Date + add(DatabaseType.builder("DATE") + .addExample("'1970-01-01'", new java.sql.Date(70, 0, 1), "'1970-01-01'") + .addExample("'2000-2-2'", new java.sql.Date(100, 1, 2), "'2000-02-02'") + .build()); + + // BLOB + // CLOB // Time // Timestamp // XML?
