Filter expression with numeric literals
---------------------------------------
Key: GEOT-717
URL: http://jira.codehaus.org/browse/GEOT-717
Project: GeoTools
Type: Bug
Components: oraclespatial
Versions: 2.1.RC1
Environment: SLES9, Sun JVM 1.4.2_08, Tomcat 5.0.19, Geoserver 1.3.0 RC3,
Oracle database server 9.2.0.4 / thick client connection
Reporter: Jürgen Link
Assigned to: Sean Geoghegan
Priority: Blocker
Our table contains several VARCAHR fields which identify land lots. The
field values are all numeric (e.g. 12345), but cannot be stored in
numeric fields due to some legacy software.
Everything seems to work fine unless we impose a filter like
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GMNR</ogc:PropertyName>
<ogc:Literal>3819</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
Oracle "performs" a table scan, which takes approx. 10 min.
We digged into this and found the SQL-statement in catalina.out - it
contains a WHERE clause similar to:
WHERE "GMNR" = 3819
That is, the filter implementation resolves our alphnumeric value 3819
to an integer. Obviously, this causes Oracle not to use its index ...
When we add some extra characters like 3819A or similar, the WHERE
clause is altered to
WHERE "GMNR" = '3819A'
which is really quick - but doesn't reveal any results!
We were told this is probably due to a misinterpretation of the Oracle SQL
Encoder.
Unfortunately I'm not yet capable of creating neither a test case nor a patch.
Anyway, this bug could be easily reconstructed with the above Filter expression.
--
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:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel