cloud-fan commented on a change in pull request #28264:
URL: https://github.com/apache/spark/pull/28264#discussion_r414363689
##########
File path: docs/sql-ref-datatypes.md
##########
@@ -706,3 +708,67 @@ 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```: equivalent to Scala <code>Float.PositiveInfinity</code>.
+ * ```DoubleType```: equivalent to Scala
<code>Double.PositiveInfinity</code>.
+ * -Inf/-Infinity: negative infinity
+ * ```FloatType```: equivalent to Scala <code>Float.NegativeInfinity</code>.
+ * ```DoubleType```: equivalent to Scala
<code>Double.NegativeInfinity</code>.
+ * NaN: not a number
+ * ```FloatType```: equivalent to Scala <code>Float.NaN</code>.
+ * ```DoubleType```: equivalent to Scala <code>Double.NaN</code>.
+
+#### Examples
+
+{% highlight sql %}
+SELECT double('infinity') AS col;
++--------+
+| col|
++--------+
+|Infinity|
++--------+
+
+SELECT float('-inf') AS col;
++---------+
+| col|
++---------+
+|-Infinity|
++---------+
+
+SELECT float('NaN') AS col;
++---+
+|col|
++---+
+|NaN|
++---+
+{% endhighlight %}
+
+### Positive/negative Infinity Semantics
Review comment:
`####` ?
----------------------------------------------------------------
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]