You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, is there a way to define an UDF function that might return a NULL value?
Like pre-defined functions cos, which can return both NULL and double based on input.
SELECT cos(NULL), cos(90) FROM test
cos(NULL) cos(90)
DOUBLE DOUBLE
[ Rows: 1]
NULL -0.448074
We've found the property is_null in Value class. Is there a way to return Value from the UDF function that we can mark is_null property within the UDF function or just return an empty Value.
Some thing like:
Value might_be_null(string_t inputStr)
{
if (intputStr.GetString() != "NULL")
{
return Value::DOUBLE(123);
}
return Value();
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, is there a way to define an UDF function that might return a NULL value?
Like pre-defined functions
cos
, which can return both NULL and double based on input.We've found the property
is_null
in Value class. Is there a way to returnValue
from the UDF function that we can mark is_null property within the UDF function or just return an empty Value.Some thing like:
Later on we can do:
It fails the type validation check at the moment.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions