You can invoke an SQL UDF within a WHERE clause search condition if the UDF returns a value expression.
This example shows a correct invocation of the SQL UDF value_expression within a WHERE clause.
SELECT test.value_expression(t1.a1, t2.a2) FROM t1, t2 WHERE t1.b1 = t2.b2 AND test.value_expression(t1.a1, t2.a2) = 10;