I have been updating mbstyle filter to support expressions, and ran into
something odd when writing tests (using ECQL to compare the output). It
appears that a literal null value does not have a representation in ECQL.
Indeed right now this causes a nice stacktrace to ECQL.toECQL( filter ).
I am not sure how we made it this far without one? Options:
- '' - empty string is not quite NULL but close
- NULL - already a reserved word, may actually be correct?
At a minimum I would like to throw a kinder error message -
ExpressionToText:
public Object visit(Literal expression, Object extraData) {
...
} else {
if (literal == null) {
throw new NullPointerException("ECQL does not support null
literal value");
} else {
String escaped = literal.toString().replaceAll("'", "''");
output.append("'" + escaped + "'");
}
}
return output;
}
Searching online is difficult as the presence of "IS NULL" and "IS NOT
NULL".
--
Jody Garnett
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel