Sql encoder is not provided with enough context when filter uses an attribute which is not part of the returned feature type ----------------------------------------------------------------------------------------------------------------------------
Key: GEOT-2294 URL: http://jira.codehaus.org/browse/GEOT-2294 Project: GeoTools Issue Type: Improvement Components: data jdbc-ng Affects Versions: 2.5.2 Reporter: Andrea Aime Assignee: Justin Deoliveira Fix For: 2.5.3 Looking into the Oracle CHAR issue yesterday (GEOT-2293) I noticed that when an attribute used for filtering is not part of the returned feature type, the encoder does not get enough context to decide what the type of the attribute is. The issue is simple, the filtered feature type gets passed down to the encoder instead of the full feature type, resulting in the filtering attribute information being missing. This in turn makes the literal encoder try to guess the type, with the usual problems when strings like "021" get turned into numbers and then compared against strings (which sometimes works, sometimes does not). The patch is simple, alwasy grab the full feature type when doing sql encoding. Actually, that is only needed when doing selects, so the patch is quite small. There is a test for this already, but it's evidently not covering all cases (and to be frank, I noticed the problem, but even Oracle was happy enough to compare the string with a number, and it was still doing the right thing). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel