We should validate the primitive types used in UDFs and UDAFs at creation time. Similar to the verifyPrimitiveType() call in Row. This will ensure the functions don't fail with a cryptic error message.
See: https://stackoverflow.com/questions/51239226/not-able-to-call-udf-in-beamsql
Imported from Jira BEAM-4746. Original Jira may contain additional context.
Reported by: apilloud.