From 4805264fd4369d3b83376a20c14cb47951b7fd06 Mon Sep 17 00:00:00 2001 From: edgar2020 Date: Tue, 17 Sep 2024 13:09:03 -0700 Subject: [PATCH 1/3] adding back admonition --- docs/querying/sql-functions.md | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/docs/querying/sql-functions.md b/docs/querying/sql-functions.md index 5cdcbb254958..a0fadba3d76d 100644 --- a/docs/querying/sql-functions.md +++ b/docs/querying/sql-functions.md @@ -558,11 +558,35 @@ Returns the rank for a row within a window without gaps. For example, if two row ## DIV -`DIV(x, y)` +Returns the result of integer division of `x` by `y`. -**Function type:** [Scalar, numeric](sql-scalar.md#numeric-functions) +* **Syntax:** `DIV(x, y)` +* **Function type:** Scalar, numeric -Returns the result of integer division of `x` by `y`. + +
Example + + The following calculates integer divisions of `78` by `10`. + + ```sql + SELECT DIV(78, 10) as "division" + ``` + + Returns the following: + + | `division` | + | -- | + | `7` | + +
+ +:::info + + The `DIV` function is not implemented in Druid versions 30.0.0 or earlier. Consider using [`SAFE_DIVIDE`](./sql-functions.md/#safe_divide) instead. + +::: + +[Learn more](sql-scalar.md#numeric-functions) ## DS_CDF From 94935b64ce94b74b733c69843cc623a20699febf Mon Sep 17 00:00:00 2001 From: edgar2020 Date: Tue, 17 Sep 2024 13:12:02 -0700 Subject: [PATCH 2/3] adapt it to keep consistent format --- docs/querying/sql-functions.md | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/docs/querying/sql-functions.md b/docs/querying/sql-functions.md index a0fadba3d76d..b2f095f667f2 100644 --- a/docs/querying/sql-functions.md +++ b/docs/querying/sql-functions.md @@ -558,27 +558,11 @@ Returns the rank for a row within a window without gaps. For example, if two row ## DIV -Returns the result of integer division of `x` by `y`. - -* **Syntax:** `DIV(x, y)` -* **Function type:** Scalar, numeric - - -
Example - - The following calculates integer divisions of `78` by `10`. +`DIV(x, y)` - ```sql - SELECT DIV(78, 10) as "division" - ``` - - Returns the following: - - | `division` | - | -- | - | `7` | +**Function type:** [Scalar, numeric](sql-scalar.md#numeric-functions) -
+Returns the result of integer division of `x` by `y`. :::info @@ -586,8 +570,6 @@ Returns the result of integer division of `x` by `y`. ::: -[Learn more](sql-scalar.md#numeric-functions) - ## DS_CDF `DS_CDF(expr, splitPoint0, splitPoint1, ...)` From 82a92073373fa721c403b106677797b14567a21b Mon Sep 17 00:00:00 2001 From: Edgar Melendrez Date: Tue, 17 Sep 2024 13:20:16 -0700 Subject: [PATCH 3/3] Update docs/querying/sql-functions.md Co-authored-by: Victoria Lim --- docs/querying/sql-functions.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/querying/sql-functions.md b/docs/querying/sql-functions.md index b2f095f667f2..efc7bf517648 100644 --- a/docs/querying/sql-functions.md +++ b/docs/querying/sql-functions.md @@ -565,9 +565,7 @@ Returns the rank for a row within a window without gaps. For example, if two row Returns the result of integer division of `x` by `y`. :::info - - The `DIV` function is not implemented in Druid versions 30.0.0 or earlier. Consider using [`SAFE_DIVIDE`](./sql-functions.md/#safe_divide) instead. - +The `DIV` function is not implemented in Druid versions 30.0.0 or earlier. Consider using [`SAFE_DIVIDE`](./sql-functions.md#safe_divide) instead. ::: ## DS_CDF