SimplifyingFilterVisitor breaks MatchAction on multivalued binary comparison operators

Description

A change introduced to SimplifyingFilterVisitor for [https://jira.codehaus.org/browse/GEOT-4938" title="Add support for range based simplification to SimplifyingFilterVisitor" class="issue-link" data-issue-key="GEOT-4938"><del>GEOT-4938</del> ignores MatchAction when negating binary comparison operators, causing incorrect results on multivalued properties.

[https://jira.codehaus.org/browse/GEOT-4938" title="Add support for range based simplification to SimplifyingFilterVisitor" class="issue-link" data-issue-key="GEOT-4938"><del>GEOT-4938</del> Add support for range based simplification to SimplifyingFilterVisitor
https://github.com/geotools/geotools/commit/9036a740fadb0a35b095a97616bb7f70ab2fd6f1 - https://github.com/geotools/geotools/commit/9036a740fadb0a35b095a97616bb7f70ab2fd6f1

Failure is seen in GeoServer app-schema-test online data reference tests:

https://github.com/geoserver/geoserver/blob/master/src/extension/app-schema/app-schema-test/src/test/java/org/geoserver/test/onlineTest/DataReferenceWfsOnlineTest.java - https://github.com/geoserver/geoserver/blob/master/src/extension/app-schema/app-schema-test/src/test/java/org/geoserver/test/onlineTest/DataReferenceWfsOnlineTest.java

The filter used is:

&lt;ogc:Filter&gt;
&lt;ogc:And&gt;
&lt;ogcropertyIsLike wildCard="*" singleChar="#" escapeChar="!"&gt;
&lt;ogc:Literal&gt;Creek Granite&lt;/ogc:Literal&gt;
&lt;ogcropertyName&gt;gml:name&lt;/ogcropertyName&gt;
&lt;/ogcropertyIsLike&gt;
&lt;ogc:Not&gt;
&lt;ogcropertyIsEqualTo&gt;
&lt;ogc:Literal&gt;mid-crustal&lt;/ogc:Literal&gt;
&lt;ogcropertyName&gt;gsml:geologicHistory/gsml:GeologicEvent/gsml:eventEnvironment/gsml:CGI_TermValue/gsml:value&lt;/ogcropertyName&gt;
&lt;/ogcropertyIsEqualTo&gt;
&lt;/ogc:Not&gt;
&lt;/ogc:And&gt;
&lt;/ogc:Filter&gt;

See:
https://cgsrv8.arrc.csiro.au/jenkins/view/geoserver-master/job/geoserver-master-app-schema-online-test/ - https://cgsrv8.arrc.csiro.au/jenkins/view/geoserver-master/job/geoserver-master-app-schema-online-test/

Failures:

testFilteringNestedMultiValuedAttribute(org.geoserver.test.onlineTest.DataReferenceWfsPostgisTest): expected:&lt;[6]&gt; but was:&lt;[9]&gt;
testFilteringNestedMultiValuedAttribute(org.geoserver.test.onlineTest.DataReferenceWfsPostgisWithJoiningTest): expected:&lt;[6]&gt; but was:&lt;[9]&gt;

Manual inspection of the response document confirms that that features that should not match the filter are included in the response.

Environment

None

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Fix versions

Affects versions

Priority

High
Configure