How to make SQL Memory Optimized Native Compiled Function Deterministic How to make SQL Memory Optimized Native Compiled Function Deterministic sql sql

How to make SQL Memory Optimized Native Compiled Function Deterministic


only a guess, I do not have 2016 to test it,
but I will try to change:

RETURN N';'

TO

DECLARE @R AS NCHAR(1) = N';'RETURN @R

I think the problem is that N';' is created as NVARCHAR(1) and then implicit converted to NCHAR(1) so maybe the conversion make it non deterministic.