Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Batch19 SQL aggregation functions #17658

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

writer-jill
Copy link
Contributor

@writer-jill writer-jill commented Jan 23, 2025

Add examples to the sql-functions.md page.

Updates the following SQL aggregation functions:

  • BLOOM_FILTER
  • BLOOM_FILTER_TEST
  • DECODE_BASE64_COMPLEX
  • DECODE_BASE64_UTF8

This PR has:

  • been self-reviewed.

@writer-jill writer-jill changed the title Batch19 SQL aggregation functions [docs] Batch19 SQL aggregation functions Jan 24, 2025

| `agent_keys` | `bloom` |
| -- | -- |
| _`empty`_ | `"BAAAAAgAAAAAABAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEABAAAAAA"` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to consider another way of formatting this (remove italics?) or see if it can be added to the spelling file. This line and the other instance of empty are raising spelling errors.

* **Syntax**: `BLOOM_FILTER_TEST(expr, <STRING>)`
* **Function type:** Scalar, other
* **Syntax:** `BLOOM_FILTER_TEST(expr, <STRING>)`
* **Function type:** Aggregation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this intentionally changed to aggregation? It's in the scalar function section. The SQL query example does look like it could be aggregating though.
https://druid.apache.org/docs/latest/querying/sql-scalar/
https://druid.apache.org/docs/latest/querying/sql-aggregations/

* **Function type:** Aggregation

<details><summary>Example</summary>

The following example returns a base64-encoded bloom filter string for entries in `agent_category`:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should Base64 be capitalized?


* **Syntax:** `DECODE_BASE64_UTF8(expr)`
* **Function type:** Scalar, string
* **Function type:** Scalar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* **Function type:** Scalar
* **Function type:** Scalar, string

Stays consistent with other entries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants