From Andrew Hulbert via email:
It throws a ClassCastException before it printlns in the ICQL.toCQL method (line 230):
StringBuilder output = (StringBuilder) filter.accept( toCQL, new StringBuilder() );
Exception here:
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.StringBuilder at org.geotools.filter.text.ecql.ECQL.toCQL(ECQL.java:230) at geomesa.core.FilterFailTest.test(FilterFailTest.java:26)
Specifically, its caused by the fact that the filter Id that is returned by the FilterFactory is visited by the class FilterToECQL line 100 which is the method that returns a String rather than a StringBuilder like it does for other Filters.
Test:
@Test
public void test(){
FilterFactory ff = CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
Filter filter = ff.id( Collections.singleton(ff.featureId("fred")));
System.out.println(ECQL.toCQL(filter)) ;
}
|