|
Here is a concrete case where this would help: if you specify in MySQL (native SQL) "select * from t where st_contains(geom1, geom2) = 1” the spatial index is not used so performance suffers. The statement "select * from t where st_contains(geom1, geom2)” however will make use of the spatial index. The current HQL parser can't parse the second statement because it fails to see that where-clause contains a valid boolean expression.
If the parser can determine that the function 'st_contains(geom1, geom2)' returns a boolean value, then it can treat the application of this functiona as a valid boolean expression.
|