Apache Lucene open-source search software
SOLR-1348 -- Support binary field type in convertType logic in JdbcDataSource
Shalin Shekhar Mangarc8d24315487d
diff --git a/contrib/dataimporthandler/CHANGES.txt b/contrib/dataimporthandler/CHANGES.txtindex 16594d94667..c6093fa964b 100644--- a/contrib/dataimporthandler/CHANGES.txt+++ b/contrib/dataimporthandler/CHANGES.txt@@ -150,7 +150,10 @@ New Features35.SOLR-1235: disallow period (.) in entity names (noble)-36.SOLR-1234: Multiple DIH does not work because all of them write to dataimport.properties. Use the handler name as the properties file name (noble)+36.SOLR-1234: Multiple DIH does not work because all of them write to dataimport.properties.+ Use the handler name as the properties file name (noble)++37.SOLR-1348: Support binary field type in convertType logic in JdbcDataSource (shalin)Optimizations----------------------diff --git a/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/JdbcDataSource.java b/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/JdbcDataSource.javaindex b394f70451d..fafdbdf21c9 100644--- a/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/JdbcDataSource.java+++ b/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/JdbcDataSource.java@@ -89,6 +89,8 @@ public class JdbcDataSource extendsfieldNameVsType.put(n, Types.DATE);else if ("boolean".equals(t))fieldNameVsType.put(n, Types.BOOLEAN);+ else if ("binary".equals(t))+ fieldNameVsType.put(n, Types.BLOB);elsefieldNameVsType.put(n, Types.VARCHAR);}@@ -307,6 +309,9 @@ public class JdbcDataSource extendscase Types.BOOLEAN:result.put(colName, resultSet.getBoolean(colName));break;+ case Types.BLOB:+ result.put(colName, resultSet.getBytes(colName));+ break;default:result.put(colName, resultSet.getString(colName));break;