The problem is that a function has to be registered in the Dialect with it's return type in order for you to be able to use it. Many functions are already registered, but apparently "random" isn't for your Dialect.