cloud-fan commented on a change in pull request #28264:
URL: https://github.com/apache/spark/pull/28264#discussion_r413589592
##########
File path: docs/sql-ref-datatypes.md
##########
@@ -706,3 +708,62 @@ The following table shows the type names as well as
aliases used in Spark SQL pa
</table>
</div>
</div>
+
+### Floating Point Special Values
+
+Spark SQL supports several special floating point values in a case-insensitive
manner:
+
+ * Inf/+Inf/Infinity/+Infinity: positive infinity
+ * ```FloatType```: 1.0f / 0.0f, which is equal to the value returned by
<code>java.lang.Float.intBitsToFloat(0x7f800000)</code>.
+ * ```DoubleType```: 1.0 / 0.0, which is equal to the value returned by
<code>java.lang.Double.longBitsToDouble(0x7ff0000000000000L)</code>.
+ * -Inf/-Infinity: negative infinity
+ * ```FloatType```: -1.0f / 0.0f, which is equal to the value returned by
<code>java.lang.Float.intBitsToFloat(0xff800000)</code>.
Review comment:
Spark doesn't support the `f` suffix. Can we say something more useful?
like: "Positive infinity multiples any positive value returns positive
infinity. Positive infinity multiples any negative value returns negative
infinity. Positive infinity multiples 0 returns NaN."
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]