Switched to use type class for Avro types in order to support passing primitives