sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arv...@apache.org
Subject svn commit: r1165981 - in /incubator/sqoop/trunk/src/java/com/cloudera/sqoop: hive/HiveTypes.java manager/SqlManager.java
Date Wed, 07 Sep 2011 02:57:57 GMT
Author: arvind
Date: Wed Sep  7 02:57:56 2011
New Revision: 1165981

URL: http://svn.apache.org/viewvc?rev=1165981&view=rev
Log:
SQOOP-323. Support for NVARCHAR datatype.

(Jarek Jarcec Cecho via Bilung Lee)

Modified:
    incubator/sqoop/trunk/src/java/com/cloudera/sqoop/hive/HiveTypes.java
    incubator/sqoop/trunk/src/java/com/cloudera/sqoop/manager/SqlManager.java

Modified: incubator/sqoop/trunk/src/java/com/cloudera/sqoop/hive/HiveTypes.java
URL: http://svn.apache.org/viewvc/incubator/sqoop/trunk/src/java/com/cloudera/sqoop/hive/HiveTypes.java?rev=1165981&r1=1165980&r2=1165981&view=diff
==============================================================================
--- incubator/sqoop/trunk/src/java/com/cloudera/sqoop/hive/HiveTypes.java (original)
+++ incubator/sqoop/trunk/src/java/com/cloudera/sqoop/hive/HiveTypes.java Wed Sep  7 02:57:56
2011
@@ -46,6 +46,12 @@ public final class HiveTypes {
       return "STRING";
     } else if (sqlType == Types.LONGVARCHAR) {
       return "STRING";
+    } else if (sqlType == Types.NVARCHAR) {
+      return "STRING";
+    } else if (sqlType == Types.NCHAR) {
+      return "STRING";
+    } else if (sqlType == Types.LONGNVARCHAR) {
+      return "STRING";
     } else if (sqlType == Types.NUMERIC) {
       // Per suggestion on hive-user, this is converted to DOUBLE for now.
       return "DOUBLE";

Modified: incubator/sqoop/trunk/src/java/com/cloudera/sqoop/manager/SqlManager.java
URL: http://svn.apache.org/viewvc/incubator/sqoop/trunk/src/java/com/cloudera/sqoop/manager/SqlManager.java?rev=1165981&r1=1165980&r2=1165981&view=diff
==============================================================================
--- incubator/sqoop/trunk/src/java/com/cloudera/sqoop/manager/SqlManager.java (original)
+++ incubator/sqoop/trunk/src/java/com/cloudera/sqoop/manager/SqlManager.java Wed Sep  7 02:57:56
2011
@@ -496,6 +496,12 @@ public abstract class SqlManager extends
       return "String";
     } else if (sqlType == Types.LONGVARCHAR) {
       return "String";
+    } else if (sqlType == Types.NVARCHAR) {
+      return "String";
+    } else if (sqlType == Types.NCHAR) {
+      return "String";
+    } else if (sqlType == Types.LONGNVARCHAR) {
+      return "String";
     } else if (sqlType == Types.NUMERIC) {
       return "java.math.BigDecimal";
     } else if (sqlType == Types.DECIMAL) {



Mime
View raw message