private static <Input, Output> FunctionDescriptor.SerializableFunction<Input, Output> createPojoJavaImplementation(
final String[] fieldNames, final BasicDataUnitType<Input> inputType) {
// Get the names of the fields to be projected.
if (fieldNames.length != 1) {
return t -> {
throw new IllegalStateException("The projection descriptor currently supports only a single field.");
};
}
final String fieldName = fieldNames[0];
return new PojoImplementation<>(fieldName);
}