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


##########
docs/querying/sql-functions.md:
##########
@@ -1282,22 +1282,75 @@ Returns the following:
 
 ## BLOOM_FILTER
 
-Computes a Bloom filter from values produced by the specified expression.
+Computes a [Bloom filter](../development/extensions-core/bloom-filter.md) from 
values provided in an expression.
 
-* **Syntax**: `BLOOM_FILTER(expr, <NUMERIC>)`
+
+* **Syntax:** `BLOOM_FILTER(expr, numEntries)`  
+  `numEntries` specifies the maximum number of distinct values before the 
false positive rate increases.
 * **Function type:** Aggregation
 
+<details><summary>Example</summary>
+
+The following example returns a Base64-encoded Bloom filter string for entries 
in `agent_category`:

Review Comment:
   I don't understand this example. It doesn't make sense to have a bloom 
filter per agent category. Checking the [doc], it looks like it is more common 
to check for the entries for a time frame.
   
   The following example returns a Base64-encoded Bloom filter string for 
entries in `agent_category` for events before 12 pm on a specific date:
   
   ```sql
   SELECT BLOOM_FILTER(agent_category, 10) as agent_bloom
   FROM "kttm"
   WHERE __time BETWEEN '2019-08-25T00:00:00.686Z' AND 
'2019-08-25T12:00:00.686Z'
   ```
   Returns the following :
   
   |`agent_bloom`|
   | --- |
   
|`"BAAAAAgAAACAAFAAQAAAgAIAAkIAAAAAQAgAAAAAAAAAAgAAAAIIAAAAAgAAAAAAAAACAAIAAAgBAQAAAAAEABAAAgIA"`|
   
   



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