Direct handling of NaNs, and SQL type-specific extractions from the java side.