private static Object nullValueForType ( final Class < ? > expectedClz ) { if ( expectedClz == long . class ) { return VoltType . NULL_BIGINT ; } else if ( expectedClz == int . class ) { return VoltType . NULL_INTEGER ; } else if ( expectedClz == short . class ) { return VoltType . NULL_SMALLINT ; } else if ( expectedClz == byte . class ) { return VoltType . NULL_TINYINT ; } else if ( expectedClz == double . class ) { return VoltType . NULL_FLOAT ; } // all non-primitive types can handle null return null ; }
Get the appropriate and compatible null value for a given parameter type .