add user-defined data type API
Merge branch 'data-type'