SPARK-1095 add explicit return types to APIs.