a data map contains a deserialized Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY, or Double.NaN
a call to DataTranslator#dataMapToGenericRecord or DataTranslator#dataMapToSpecificRecord is made with the data map.
This flow throws an exception because those double values are serialized as strings (Infinity, -Infinity, NaN) and are then attempted to be deserialized directly into a Double (ClassCastException: java.lang.String cannot be cast to java.lang.Number).
Bug fix - The scenario is as follows:
Double.POSITIVE_INFINITY
,Double.NEGATIVE_INFINITY
, orDouble.NaN
DataTranslator#dataMapToGenericRecord
orDataTranslator#dataMapToSpecificRecord
is made with the data map.This flow throws an exception because those double values are serialized as strings (
Infinity
,-Infinity
,NaN
) and are then attempted to be deserialized directly into a Double (ClassCastException: java.lang.String cannot be cast to java.lang.Number
).