Good catch,  I'll check the spec to see if either order is supported but
since we used to allow it I think we should continue to.

I'll add another test to GeoTools to catch this and see why my change broke
it.

Ian

On Fri, 11 May 2018 at 03:08, Ben Caradoc-Davies <b...@transient.nz> wrote:

> Reverting the GEOT-5920 change fixes the PagingTest postgis failure.
>
> PagingTest uses ogc:PropertyIsLike. Unusually, it places the literal
> before the property name:
>
> <ogc:PropertyIsLike wildCard="*" singleChar="#" escapeChar="!">
> <ogc:Literal>M*</ogc:Literal>
> <ogc:PropertyName>gml:name</ogc:PropertyName>
> </ogc:PropertyIsLike>
>
> There is another one like this at DataReferenceWfsOnlineTest:878 in
> testFilteringNestedMultiValuedAttribute that also fails with the
> GEOT-5920 change.
>
> Changing the order of these ogc:PropertyIsLike children so that
> ogc:PropertyName comes before ogc:Literal fixes both online tests (with
> postgis), even with the GEOT-5920 change.
>
> [GEOS-8738] gs-app-schema-postgis-test build fails in PagingTest
> https://github.com/geoserver/geoserver/pull/2879
> https://osgeo-org.atlassian.net/browse/GEOS-8738
>
> I am guessing that SQL generation does not support this order after the
> GEOT-5920 change, but GeoTools LikeFilterImpl comparison does, leading
> to the pass running with the offline properties file fixture and a fail
> running online with postgis.
>
> So, is this unusual order permitted and a bug in GeoTools or is this a
> bug in PagingTest and DataReferenceWfsOnlineTest? We should agree on
> this point before the pull request is merged.
>
> Kind regards,
> Ben.
>
> On 11/05/18 05:10, Ian Turton wrote:
> > That one should should only have affected like filters, and even then
> > should have had no effect on standard behaviour.
> >
> > Ian
> >
> > On Thu, 10 May 2018, 10:51 Andrea Aime, <andrea.a...@geo-solutions.it>
> > wrote:
> >
> >> Hi Nuno,
> >> the only recent change that might seem to be even remotely related is
> this
> >> one:
> >>
> >> [GEOT-5920] WFSClient fails when a function is used in a query
> >>
> >> which had some changes in the XML parsing of filters:
> >>
> >>
> >>
> https://github.com/geotools/geotools/commit/3d33f397d3a5e598585c38f72a9695b71be0702a
> >>
> >> Are those app-schema tests parsing filters from XML?
> >>
> >> Cheers
> >> Andrea
>
> --
> Ben Caradoc-Davies <b...@transient.nz>
> Director
> Transient Software Limited <https://transient.nz/>
> New Zealand
>


-- 
Ian Turton
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to