You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2008/12/11 09:33:44 UTC
[jira] Updated: (SOLR-888) DateFormatTransformer cannot convert
non-string type
[ https://issues.apache.org/jira/browse/SOLR-888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shalin Shekhar Mangar updated SOLR-888:
---------------------------------------
Fix Version/s: 1.4
Assignee: Shalin Shekhar Mangar
Priority: Minor (was: Major)
Summary: DateFormatTransformer cannot convert non-string type (was: DateFormatTransformer can't handle objects of type java.sql.TimeStamp)
> DateFormatTransformer cannot convert non-string type
> ----------------------------------------------------
>
> Key: SOLR-888
> URL: https://issues.apache.org/jira/browse/SOLR-888
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 1.3
> Environment: any
> Reporter: Amit Nithian
> Assignee: Shalin Shekhar Mangar
> Priority: Minor
> Fix For: 1.4
>
> Attachments: DateFormatTransformer.java
>
> Original Estimate: 0.02h
> Remaining Estimate: 0.02h
>
> When using the DateFormatTransformer, if the source column is of type java.sql.TimeStamp, an exception is thrown converting this to a String. Solution is to not typecast to a String but rather invoke the .toString() method of the object to retrieve the string representation of the object.
> (About line 68)
> } else {
> String value = (String) o;
> aRow.put(column, process(value, fmt));
> }
> should be
> } else {
> String value = o.toString();
> aRow.put(column, process(value, fmt));
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.