DRILL-452: Conversion functions for external data types

https://reviews.apache.org/r/19723/