Fix metadata handling

This commit is contained in:
Kevin Risden 2016-10-27 15:08:30 -05:00
parent 2e7f5f9283
commit 285bbf0127
1 changed files with 2 additions and 3 deletions

View File

@ -130,7 +130,6 @@ public class SQLHandler extends RequestHandlerBase implements SolrCoreAware , Pe
tupleStream = new StreamHandler.TimerStream(new ExceptionStream(tupleStream)); tupleStream = new StreamHandler.TimerStream(new ExceptionStream(tupleStream));
rsp.add("result-set", tupleStream); rsp.add("result-set", tupleStream);
} catch(Exception e) { } catch(Exception e) {
//Catch the SQL parsing and query transformation exceptions. //Catch the SQL parsing and query transformation exceptions.
@ -217,8 +216,8 @@ public class SQLHandler extends RequestHandlerBase implements SolrCoreAware , Pe
for(int i = 1; i <= numColumns; i++) { for(int i = 1; i <= numColumns; i++) {
String columnName = resultSetMetaData.getColumnName(i); String columnName = resultSetMetaData.getColumnName(i);
String columnLabel = resultSetMetaData.getColumnLabel(i); String columnLabel = resultSetMetaData.getColumnLabel(i);
metadataFields.add(columnName); metadataFields.add(columnLabel);
metadataAliases.put(columnName, columnLabel); metadataAliases.put(columnLabel, columnName);
} }
fields.put("isMetadata", true); fields.put("isMetadata", true);