Hey,

I've noticed in the JDBCFeatureSource.count(Query query, Transaction transaction) method may have an incorrect check in it that's disabling the use of an optimization to calculate the record count.

The count method is checking that the PostQueryFilter is not null, but I believe that it should also be checking that it's not Filter.NONE, as the JDBCFeatureCollection.aggregate(String aggregate, _expression_ _expression_) method does.

JDBCFeatureSource is:

        if (sqlBuilder.getPostQueryFilter(query.getFilter()) != null) {
            // this would require postprocessing the filter
            // so we cannot optimize
            return -1;
        }

whereas JDBCFeatureCollection is:

        Filter postFilter = sqlBuilder.getPostQueryFilter(query.getFilter());
        if (postFilter != null && postFilter != Filter.NONE) {
            // this would require postprocessing the filter
            // so we cannot optimize
            return null;
        }

Cheers,
Shaun
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to