edgar2020 commented on code in PR #16805:
URL: https://github.com/apache/druid/pull/16805#discussion_r1693459408


##########
docs/querying/sql-functions.md:
##########
@@ -336,68 +336,189 @@ Performs a bitwise XOR operation on all input values.
 
 ## BITWISE_AND
 
-`BITWISE_AND(expr1, expr2)`
+Returns the bitwise AND between two expressions, that is, `expr1 & expr2`. 
 
-**Function type:** [Scalar, numeric](sql-scalar.md#numeric-functions)
+* **Syntax:** `BITWISE_AND(expr1, expr2)`
+* **Function type:** Scalar, numeric
+
+<details><summary>Example</summary>
+
+The following example performs the bitwise AND operation `12 & 10`.
+
+```sql
+SELECT BITWISE_AND(12, 10) AS "bitwise_and"
+```
+Returns the following:
 
-Returns the bitwise AND between the two expressions, that is, `expr1 & expr2`.
+| `bitwise_and` | 
+| -- |
+| 8 | 
+</details>
+
+[Learn more](sql-scalar.md#numeric-functions)
 
 ## BITWISE_COMPLEMENT
 
-`BITWISE_COMPLEMENT(expr)`
+Returns the bitwise complement (bitwise not) for the expression, that is, 
`~expr`.
 
-**Function type:** [Scalar, numeric](sql-scalar.md#numeric-functions)
+* **Syntax:** `BITWISE_COMPLEMENT(expr)`
+* **Function type:** Scalar, numeric
+
+<details><summary>Example</summary>
+
+The following example performs the bitwise complement operation `~12`.
+
+```sql
+SELECT BITWISE_COMPLEMENT(12) AS "bitwise_complement"
+```
+Returns the following:
 
-Returns the bitwise NOT for the expression, that is, `~expr`.
+| `bitwise_complement` | 
+| -- |
+| -13 | 
+</details>
+
+[Learn more](sql-scalar.md#numeric-functions)
 
 ## BITWISE_CONVERT_DOUBLE_TO_LONG_BITS
 
-`BITWISE_CONVERT_DOUBLE_TO_LONG_BITS(expr)`
+Converts the bits of an IEEE 754 floating-point double value to long.
 

Review Comment:
   The definition for BITWISE_CONVERT_DOUBLE_TO_LONG_BITS and 
BITWISE_CONVERT_LONG_BITS_TO_DOUBLE  is a little hard to follow, especially 
with no context of binary are the different binary formats. Would like feedback 
on if this enough of an explanation given it is just a reference guide.



-- 
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: commits-unsubscr...@druid.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to