techdocsmith commented on code in PR #16745:
URL: https://github.com/apache/druid/pull/16745#discussion_r1681612719


##########
docs/querying/sql-functions.md:
##########
@@ -28,17 +28,39 @@ sidebar_label: "All functions"
  This document describes the SQL language.
 :::
 
+This page provides a reference of all Druid SQL functions in alphabetical 
order. The **Learn More** at the end of each function section provides further 
documentation.
 
-This page provides a reference of all Druid SQL functions in alphabetical 
order.
-Click the linked function type for documentation on a particular function.
+The examples for each function uses the following datasets that come included 
with Apache Druid:
+* `flight-carriers`: `FlightCarrierOnTime (1 month)` 
+* `trips_xaa`: `NYC Taxi cabs (3 files)`
 
 ## ABS
 
-`ABS(<NUMERIC>)`
+Calculates the absolute value of a numeric expression.
 
-**Function type:** [Scalar, numeric](sql-scalar.md#numeric-functions)
+* **Syntax:** `ABS(<NUMERIC>)`
+* **Function type:** Scalar, numeric
 
-Calculates the absolute value of a numeric expression.
+<details><summary>Example</summary>
+
+The following applies the ABS function to the `ArrDelay` column, from the 
`flight-carriers` datasource.
+
+```sql
+SELECT
+  "ArrDelay",

Review Comment:
   suggest aliasing column using `AS` to provide an English language column 
name. For example `arrival_delay`. Then you can use a similar English column 
name for the ABS: `absolute_arrival_delay`. This applies to all examples.
   Also standardize all your column aliases to use lowercase and underscore.



##########
docs/querying/sql-functions.md:
##########
@@ -729,11 +790,30 @@ Rounds down a timestamp by a given time unit.
 
 ## FLOOR (numeric)
 
-`FLOOR(<NUMERIC>)`
+Rounds down to the largest integer value less than or equal to the numeric 
expression.
 
-**Function type:** [Scalar, numeric](sql-scalar.md#numeric-functions)
+* **Syntax:** `Floor(<NUMERIC>)`

Review Comment:
   ```suggestion
   * **Syntax:** `FLOOR(<NUMERIC>)`
   ```
   use all caps for functions



##########
docs/querying/sql-functions.md:
##########
@@ -28,17 +28,39 @@ sidebar_label: "All functions"
  This document describes the SQL language.
 :::
 
+This page provides a reference of all Druid SQL functions in alphabetical 
order. The **Learn More** at the end of each function section provides further 
documentation.
 
-This page provides a reference of all Druid SQL functions in alphabetical 
order.
-Click the linked function type for documentation on a particular function.
+The examples for each function uses the following datasets that come included 
with Apache Druid:

Review Comment:
   ```suggestion
   The examples in this topic use the following Apache Druid example datasets:
   ```
   note subject/verb agreement



##########
docs/querying/sql-functions.md:
##########
@@ -697,11 +739,30 @@ Returns the value of a numeric or string expression 
corresponding to the earlies
 
 ## EXP
 
-`EXP(<NUMERIC>)`
+Calculates _e_ raised to the power of the numeric expression.
 
-**Function type:** [Scalar, numeric](sql-scalar.md#numeric-functions)
+* **Syntax:** `EXP(<NUMERIC>)`
+* **Function type:** Scalar, numeric
 
-Calculates _e_ raised to the power of the numeric expression.
+<details><summary>Example</summary>
+
+The following example raise _e_ to the power of `trip_id`, from the 
`trips_xaa` datasource.
+
+```sql
+SELECT
+  "trip_id" AS "exponent_value",
+  EXP(trip_id) AS "Exp"
+FROM "trips_xaa"
+LIMIT 1
+```
+Returns the following:
+
+| `exponent_value` | `Exp` | 
+| -- | -- | 
+| `1` | `2.7182818284590455` | 

Review Comment:
   There are going to be a few of these where there may not exist a column in 
the dataset that makes sense for the function. this is one of those.
   
   Wondering if it makes more sense to just demo the function with a constant 
rather than a column value like this:
   
   ```
   SELECT EXP(1) AS "exponential"
   FROM taxi_trips
   LIMIT 1
   ```
   Returns the following:
   
   | `exponential` | 
   | -- | -- | 
   | `2.7182818284590455` | 
   
   @vtlim or @ektravel , any opinion here?



##########
docs/querying/sql-functions.md:
##########
@@ -28,17 +28,39 @@ sidebar_label: "All functions"
  This document describes the SQL language.
 :::
 
+This page provides a reference of all Druid SQL functions in alphabetical 
order. The **Learn More** at the end of each function section provides further 
documentation.

Review Comment:
   ```suggestion
   This page provides a reference of Druid SQL functions in alphabetical order.
   <-- The **Learn More** at the end of each function section provides further 
documentation. -->
   For more detail on a function, refer to the following:
   [bulleted list of the reference docs]
   ```
   Let's leave the information about learn more out until we're done. It 
doesn't quite apply to the whole topic yet.
   Also, let's remove "all" here and in the title.



##########
docs/querying/sql-functions.md:
##########
@@ -28,17 +28,39 @@ sidebar_label: "All functions"
  This document describes the SQL language.
 :::
 
+This page provides a reference of all Druid SQL functions in alphabetical 
order. The **Learn More** at the end of each function section provides further 
documentation.
 
-This page provides a reference of all Druid SQL functions in alphabetical 
order.
-Click the linked function type for documentation on a particular function.
+The examples for each function uses the following datasets that come included 
with Apache Druid:
+* `flight-carriers`: `FlightCarrierOnTime (1 month)` 
+* `trips_xaa`: `NYC Taxi cabs (3 files)`

Review Comment:
   ```suggestion
   * `FlightCarrierOnTime (1 month)` abbreviated as `flight-carriers`
   * `NYC Taxi cabs (3 files)` abbreviated as `taxi-trips`
   ```
   Lead with the examples as named in Druid and follow with the abbreviation.
   Recommend using a standard datasource naming convention. (in this case a 
dash)
   Also, use English in example names where possible
   



-- 
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]

Reply via email to