Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Docs
Description
Currently, every function needs to deal with it's argument potentially being null. There is very many case where that's just annoying, users should be able to define a function like:
CREATE FUNCTION addTwo(val int) RETURNS int LANGUAGE JAVA AS 'return val + 2;'
without having this crashing as soon as a column it's applied to doesn't a value for some rows (I'll note that this definition apparently cannot be compiled currently, which should be looked into).
In fact, I think that by default methods shouldn't have to care about null values: if the value is null, we should not call the method at all and return null. There is still methods that may explicitely want to handle null (to return a default value for instance), so maybe we can add an ALLOW NULLS to the creation syntax.
Attachments
Attachments
Issue Links
- links to