Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Sqoop, mail # dev - Re: Review Request 12949: SQOOP-1149: Support custom postgres types (e.g. inet for IP addresses) - which includes postgres enums.


+
Nick White 2013-07-28, 18:05
+
Nick White 2013-07-29, 01:37
+
Nick White 2013-08-01, 15:43
Copy link to this message
-
Re: Review Request 12949: SQOOP-1149: Support custom postgres types (e.g. inet for IP addresses) - which includes postgres enums.
Nick White 2013-08-01, 15:47

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12949/
-----------------------------------------------------------

(Updated Aug. 1, 2013, 3:47 p.m.)
Review request for Sqoop.
Changes
-------

(removed unneeded cast)
Repository: sqoop-trunk
Description
-------

The patch adds a PostgresqlExportJob that replaces the OutputFormat (if needed) with a PostgresqlExportOutputFormat that inserts casts into the generated SQL statement (e.g. insert into mytable values (?, ?::inet, ?)). The patch also consolidates the various functions on ConnManager that return SQL type ints and type names into just one for each. This means the chunks of code in various parts of the codebase that select which of the three (former) methods to call can be replaced with a single call - and the call "routing" logic only appears in one place (ConnManager).
Diffs (updated)
-----

  src/java/com/cloudera/sqoop/lib/JdbcWritableBridge.java 316547f
  src/java/org/apache/sqoop/lib/JdbcWritableBridge.java afde585
  src/java/org/apache/sqoop/manager/ConnManager.java f4b22f9
  src/java/org/apache/sqoop/manager/PostgresqlManager.java bd882b9
  src/java/org/apache/sqoop/orm/ClassWriter.java 1bd2a41
  src/test/com/cloudera/sqoop/manager/PostgresqlExportTest.java 0ac4599

Diff: https://reviews.apache.org/r/12949/diff/
Testing
-------

I've added two cases to PostgresqlExportTest and tested them against a 9.3 database.
Thanks,

Nick White