sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject svn commit: r1366886 - /sqoop/trunk/src/java/org/apache/sqoop/manager/SQLServerManager.java
Date Sun, 29 Jul 2012 18:27:46 GMT
Author: jarcec
Date: Sun Jul 29 18:27:45 2012
New Revision: 1366886

URL: http://svn.apache.org/viewvc?rev=1366886&view=rev
Log:
SQOOP-521. Import fails on tables with names containing hyphens ( - ).

(Abhijeet Gaikwad via Jarek Jarcec Cecho)

Modified:
    sqoop/trunk/src/java/org/apache/sqoop/manager/SQLServerManager.java

Modified: sqoop/trunk/src/java/org/apache/sqoop/manager/SQLServerManager.java
URL: http://svn.apache.org/viewvc/sqoop/trunk/src/java/org/apache/sqoop/manager/SQLServerManager.java?rev=1366886&r1=1366885&r2=1366886&view=diff
==============================================================================
--- sqoop/trunk/src/java/org/apache/sqoop/manager/SQLServerManager.java (original)
+++ sqoop/trunk/src/java/org/apache/sqoop/manager/SQLServerManager.java Sun Jul 29 18:27:45
2012
@@ -77,5 +77,21 @@ public class SQLServerManager
   protected String getSchemaQuery() {
     return "SELECT SCHEMA_NAME()";
   }
+
+  @Override
+  public String escapeColName(String colName) {
+    if (null == colName) {
+      return null;
+    }
+    return "[" + colName + "]";
+  }
+
+  @Override
+  public String escapeTableName(String tableName) {
+    if (null == tableName) {
+      return null;
+    }
+    return "[" + tableName + "]";
+  }
 }
 



Mime
View raw message