fix return type casting for script-based-UDFs
Merge branch '7526v3-udf-script' into 7874-jsr223