PL/Container R does not return correct NULL result
HaozhouWang opened this issue · 3 comments
HaozhouWang commented
Function:
CREATE OR REPLACE FUNCTION rint2(i int2) RETURNS int2 AS $$
# container: plc_r_shared
return (as.integer(i))
$$ LANGUAGE plcontainer;
Expected:
select rint2(NULL::int2);
rint2
-------
(1 row)
Actual:
select rint2(NULL::int2);
rint2
-------
0
(1 row)
cf-gitbot commented
We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.
The labels on this github issue will be updated when the story is started.
xuebinsu commented
This issue is due to RClient does not handle NULL values (NA values in R) correctly when returning results. This is now fixed and PR has been sent (but not merged yet).
xuebinsu commented
PR was merged.