You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/21 16:16:41 UTC

[GitHub] srowen commented on issue #23851: [SPARK-26950][SQL][TEST] Make RandomDataGenerator use Float.NaN or Double.NaN for all NaN values

srowen commented on issue #23851: [SPARK-26950][SQL][TEST] Make RandomDataGenerator use Float.NaN or Double.NaN for all NaN values
URL: https://github.com/apache/spark/pull/23851#issuecomment-466061704
 
 
   Huh! I didn't realize there were many representations of NaN.
   https://en.wikipedia.org/wiki/IEEE_754-1985#NaN
   
   This seems OK.
   
   However this code caught my attention; it seems to be trying to generate floats 'uniformly' with `intBitsToFloat(r.nextInt())` . That's not uniform; small values are way more likely. That may be desirable or not matter. If you feel like it, maybe change `randomNumeric`'s `uniformRand` argument to not say 'uniform'.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org