Hi,

> I noticed in the latest build the following behavior for user-defined
> Java functions with primitive arguments.

Could you provide an example? For user defined functions, you can
already implement the behavior yourself. I don't think it's necessary
to add any additional features in the database. Maybe the
documentation needs to be improved, let's see. From
http://www.h2database.com/html/features.html#user_defined_functions :

= Function Data Type Mapping =
Functions that accept non-nullable parameters such as "int" will not
be called if one of those parameters is NULL. Instead, the result of
the function is NULL. If the function should be called if a parameter
is NULL, you need to use java.lang.Integer instead.

> The end user has no control over this behavior

The person who implements the user defined function is the one that
decides what to do. That's how it should be.

> I propose to throw an
> exception

For user defined functions, the most logic solution is that the user
defined method throws an exception, or convert null to NaN if needed.
There is no need to "declare" that. Declaring would only make it
slower, and would add unnecessary complexity, without adding any new
feature.

Regards,
Thomas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to