Description
See the Scala version in SPARK-14285. The main problem we'd need to work around is that Java cannot return primitive types in generics, and as a result we would have to return boxed types.
One requirement is that we should add tests for both Java 7 style (in sql/core) and Java 8 style lambdas (in external/java-8...).