I'm attempting to do the following in my DoFn to extract a double value
from an existing nullable field in my schema: *@FieldAccess("field1) Double
field*. However I'm getting the following exception:

*java.lang.IllegalArgumentException: Element argument type java.lang.Double
does not work with expected schema field type DOUBLE*

On debugging, the issue seems to be in
ConvertHelpers.getConvertPrimitive(). Specifically,
*StaticSchemaInference.fieldFromType()* seems to return FieldType DOUBLE
NOT NULL regardless of whether a Double object or a primitive double is
specified. This also then seems to cause a mismatch to the schema type
which is only DOUBLE (i.e, without the NOT NULL).

I can't seem to figure out another obvious way to obtain a nullable value
via @FieldAccess and the examples/tests in the Beam codebase don't seem to
cover this scenario either. Any ideas?

Reply via email to