asdf2014 commented on code in PR #17293:
URL: https://github.com/apache/druid/pull/17293#discussion_r1792964751
##########
docs/querying/sql-functions.md:
##########
@@ -27,26 +27,70 @@ sidebar_label: "All functions"
Apache Druid supports two query languages: Druid SQL and [native
queries](querying.md).
This document describes the SQL language.
:::
+<!-- The **Learn More** at the end of each function section provides further
documentation. -->
+This page provides a reference of Apache Druid® SQL functions in
alphabetical order. For more details on a function, refer to the following:
+* [Aggregation functions](sql-aggregations.md)
+* [Array functions](sql-array-functions.md)
+* [JSON functions](sql-json-functions.md)
+* [Multi-value string functions](sql-multivalue-string-functions.md)
+* [Scalar functions](sql-scalar.md)
+* [Window functions](sql-window-functions.md)
+
+The examples on this page use the following example datasources:
+* `flight-carriers` using `FlightCarrierOnTime (1 month)`
+* `taxi-trips` using `NYC Taxi cabs (3 files)`
+* `kttm` using `KoalasToTheMax one day`
+## ABS
-This page provides a reference of all Druid SQL functions in alphabetical
order.
-Click the linked function type for documentation on a particular function.
+Calculates the absolute value of a numeric expression.
-## ABS
+* **Syntax:** `ABS(<NUMERIC>)`
+* **Function type:** Scalar, numeric
-`ABS(<NUMERIC>)`
+<details><summary>Example</summary>
-**Function type:** [Scalar, numeric](sql-scalar.md#numeric-functions)
+The following example applies the ABS function to the `ArrDelay` column from
the `flight-carriers` datasource.
-Calculates the absolute value of a numeric expression.
+```sql
+SELECT
+ "ArrDelay" AS "arrival_delay",
+ ABS("ArrDelay") AS "absolute_arrival_delay"
+FROM "flight-carriers"
+WHERE "ArrDelay" < 0
+LIMIT 1
+```
+Returns the following:
+
+| `arrival_delay` | `absolute_arrival_delay` |
+| -- | -- |
+| `-27` | `27` |
+</details>
+
+[Learn more](sql-scalar.md#numeric-functions)
## ACOS
-`ACOS(<NUMERIC>)`
+Calculates the arc cosine (arccosine) of a numeric expression.
+
+* **Syntax:** `ACOS(expr)`
+* **Function type:** Scalar, numeric
+
+<details><summary>Example</summary>
-**Function type:** [Scalar, numeric](sql-scalar.md#numeric-functions)
+The following example calculates the arc cosine of `0`.
Review Comment:
```suggestion
The following example calculates the arc cosine of `0`.
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]