Skip to content

Commit

Permalink
GEOT-4322 Oracle SDO_NN function: fixed result type
Browse files Browse the repository at this point in the history
  • Loading branch information
svzdvd committed Dec 20, 2012
1 parent d53ca9a commit a5295be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,13 @@ private FilterFunction_sdonn getSDO_NN_Query(PropertyIsEqualTo filter) {
if (expr1 instanceof FilterFunction_sdonn) {
if (!(expr2 instanceof Literal)) {
throw new UnsupportedOperationException(
"Unsupported usage of SDO_NN Oracle function: property must be TRUE");
"Unsupported usage of SDO_NN Oracle function: it can be compared only to a Boolean \"true\" value");
}

Boolean nearest = (Boolean) evaluateLiteral((Literal) expr2, Boolean.class);
if (nearest == null || !nearest.booleanValue()) {
throw new UnsupportedOperationException(
"Unsupported usage of SDO_NN Oracle function: property must be TRUE");
"Unsupported usage of SDO_NN Oracle function: it can be compared only to a Boolean \"true\" value");
}

return (FilterFunction_sdonn) expr1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/
public class FilterFunction_sdonn extends FunctionExpressionImpl implements VolatileFunction {

public static FunctionName NAME = new FunctionNameImpl("sdo_nn", String.class,
public static FunctionName NAME = new FunctionNameImpl("sdo_nn", Boolean.class,
// required parameters:
FunctionNameImpl.parameter("geometry", Geometry.class),
FunctionNameImpl.parameter("sdo_num_res", Integer.class),
Expand Down

0 comments on commit a5295be

Please sign in to comment.