#4326 closed defect (fixed)
OGR SQL: OGRFeatureQuery::EvaluateAgainstIndices() : field type is used instead of the node type
Reported by: | Even Rouault | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | tamas |
Description
Side issue seen in #4259
There's a bug in OGRFeatureQuery::EvaluateAgainstIndices?() that should be fixed (by testing the node type and doing the appropriate cast), and not in your new code (SWQAutoConvertStringToNumeric). Because we currently have a bug *without* your new code :
ogr2ogr mypoly.shp ../autotest/ogr/data/poly.shp -sql "select cast(EAS_ID as integer) as EAS_ID_INT, * from poly" ogrinfo mypoly.shp -sql "create index on mypoly using EAS_ID_INT" ogrinfo mypoly.shp -where "EAS_ID_INT in (170)" -al --> works ogrinfo mypoly.shp -where "EAS_ID_INT in (170.0)" -al --> doesn't work
Change History (3)
comment:1 by , 12 years ago
Milestone: | → 1.8.2 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:2 by , 12 years ago
Note:
See TracTickets
for help on using tickets.
r23307 /trunk/ (autotest/ogr/ogr_index_test.py gdal/ogr/ogrfeaturequery.cpp): Fix bug in OGRFeatureQuery::EvaluateAgainstIndices() when querying a integer field that is indexed with a request with a float value (#4326)
r23308 /branches/1.8/ (autotest/ogr/ogr_index_test.py gdal/ogr/ogrfeaturequery.cpp): Fix bug in OGRFeatureQuery::EvaluateAgainstIndices() when querying a integer field that is indexed with a request with a float value (#4326)