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 2020/08/23 20:59:48 UTC
[GitHub] [spark] viirya commented on a change in pull request #29515: [WIP][SPARK-32688][SQL][TESTS] Add special values to LiteralGenerator for float and double
viirya commented on a change in pull request #29515:
URL: https://github.com/apache/spark/pull/29515#discussion_r475266733
##########
File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/LiteralGenerator.scala
##########
@@ -70,14 +70,22 @@ object LiteralGenerator {
lazy val floatLiteralGen: Gen[Literal] =
for {
- f <- Gen.chooseNum(Float.MinValue / 2, Float.MaxValue / 2,
- Float.NaN, Float.PositiveInfinity, Float.NegativeInfinity)
+ f <- Gen.oneOf(
+ Gen.oneOf(
+ Float.NaN, Float.PositiveInfinity, Float.NegativeInfinity, Float.MinPositiveValue,
+ 0.0f, -0.0f, 1.0f, -1.0f),
+ Arbitrary.arbFloat.arbitrary
Review comment:
Except for the special values, original generated range is Float.MinValue / 2, Float.MaxValue / 2. The revised one is different? Although looks like it is okay.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org