Skip to content

[SQL] tanh function#639

Open
kbatuigas wants to merge 4 commits into
mainfrom
DOC-2263-document-feature-sql-tanh-document-on-docs-oxla
Open

[SQL] tanh function#639
kbatuigas wants to merge 4 commits into
mainfrom
DOC-2263-document-feature-sql-tanh-document-on-docs-oxla

Conversation

@kbatuigas

@kbatuigas kbatuigas commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Description

This pull request updates the SQL function documentation to standardize function names to lowercase and adds documentation for the tanh function. The changes improve consistency and clarity across the docs, ensuring that function references, examples, and descriptions use lowercase names to match SQL syntax and conventions.

Standardization of SQL function names to lowercase:

  • Updated all references, descriptions, and examples for the following functions to use lowercase: greatest, least, coalesce, and nullif (modules/reference/pages/sql/sql-functions/math-functions/greatest.adoc, modules/reference/pages/sql/sql-functions/math-functions/least.adoc, modules/reference/pages/sql/sql-functions/other-functions/coalesce.adoc, modules/reference/pages/sql/sql-functions/other-functions/nullif.adoc, modules/reference/pages/sql/sql-functions/math-functions/index.adoc, modules/reference/pages/sql/sql-functions/other-functions/index.adoc) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19]

Addition of new function documentation:

  • Added documentation for the tanh (hyperbolic tangent) mathematical function, including syntax, arguments, return type, and usage examples (modules/reference/pages/sql/sql-functions/math-functions/tanh.adoc, modules/ROOT/nav.adoc, modules/reference/pages/sql/sql-functions/math-functions/index.adoc) [1] [2] [3]

Other improvements:

  • Updated documentation to use lowercase for other function names in navigation and table of contents references (modules/ROOT/nav.adoc, modules/reference/pages/sql/sql-data-types/text.adoc, modules/reference/pages/sql/sql-data-types/interval.adoc) [1] [2] [3]

These changes make the documentation more consistent with SQL syntax and easier for users to follow.

Resolves https://github.com/redpanda-data/documentation-private/issues/DOC-2263
Review deadline:

Page previews

Checks

  • New feature
  • Content gap
  • Support Follow-up
  • Small fix (typos, links, copyedits, etc)

When in prose or page titles/headings, use lowercase for function names
regardless of whether they follow SQL-standard constructs/grammar
@kbatuigas
kbatuigas requested a review from a team as a code owner July 18, 2026 02:15
@netlify

netlify Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploy Preview for rp-cloud ready!

Name Link
🔨 Latest commit 4e36526
🔍 Latest deploy log https://app.netlify.com/projects/rp-cloud/deploys/6a6182f5fc9b0d000965c9c0
😎 Deploy Preview https://deploy-preview-639--rp-cloud.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 960f9dcf-67d3-481d-bf28-af41484cee57

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new tanh SQL function reference page with syntax, type details, and examples, then registers it in the math-function index and navigation. Normalizes function names to lowercase across math, timestamp, string, interval, text, coalesce, and nullif documentation, including titles, descriptions, tables, and example headings. SQL queries and outputs remain unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and matches the main change, highlighting the new tanh SQL function.
Description check ✅ Passed The description matches the template structure and covers the key changes; only page previews and review deadline remain unfilled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DOC-2263-document-feature-sql-tanh-document-on-docs-oxla

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@modules/reference/pages/sql/sql-functions/math-functions/index.adoc`:
- Around line 17-18: Update the greatest and least table labels to use lowercase
function-call notation, preserving the trailing parentheses, so they match the
surrounding function references while leaving the descriptions unchanged.

In `@modules/reference/pages/sql/sql-functions/math-functions/tanh.adoc`:
- Line 16: Update the `x` argument description for `TANH` to include zero by
describing it as a number of type `real` or `double precision`, while preserving
the existing type information.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 69dcaa12-1942-46d2-aff8-295232c5ed04

📥 Commits

Reviewing files that changed from the base of the PR and between 4824c0b and aeb60cc.

📒 Files selected for processing (16)
  • modules/ROOT/nav.adoc
  • modules/reference/pages/sql/sql-data-types/interval.adoc
  • modules/reference/pages/sql/sql-data-types/text.adoc
  • modules/reference/pages/sql/sql-functions/math-functions/greatest.adoc
  • modules/reference/pages/sql/sql-functions/math-functions/index.adoc
  • modules/reference/pages/sql/sql-functions/math-functions/least.adoc
  • modules/reference/pages/sql/sql-functions/math-functions/tanh.adoc
  • modules/reference/pages/sql/sql-functions/other-functions/coalesce.adoc
  • modules/reference/pages/sql/sql-functions/other-functions/index.adoc
  • modules/reference/pages/sql/sql-functions/other-functions/nullif.adoc
  • modules/reference/pages/sql/sql-functions/string-functions/index.adoc
  • modules/reference/pages/sql/sql-functions/string-functions/position.adoc
  • modules/reference/pages/sql/sql-functions/string-functions/strpos.adoc
  • modules/reference/pages/sql/sql-functions/string-functions/substring.adoc
  • modules/reference/pages/sql/sql-functions/timestamp-functions/extract.adoc
  • modules/reference/pages/sql/sql-functions/timestamp-functions/index.adoc

Comment on lines +17 to +18
|xref:reference:sql/sql-functions/math-functions/greatest.adoc[`greatest`] |This function extracts the greatest or largest value from a set of values.
|xref:reference:sql/sql-functions/math-functions/least.adoc[`least`] |This function returns the least or smallest value in a list of values

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Retain the function-call notation in the table labels.

Lowercase the names without removing (), so these entries remain consistent with the surrounding function references.

Proposed fix
-|xref:reference:sql/sql-functions/math-functions/greatest.adoc[`greatest`] |
-|xref:reference:sql/sql-functions/math-functions/least.adoc[`least`] |
+|xref:reference:sql/sql-functions/math-functions/greatest.adoc[`greatest()`] |
+|xref:reference:sql/sql-functions/math-functions/least.adoc[`least()`] |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
|xref:reference:sql/sql-functions/math-functions/greatest.adoc[`greatest`] |This function extracts the greatest or largest value from a set of values.
|xref:reference:sql/sql-functions/math-functions/least.adoc[`least`] |This function returns the least or smallest value in a list of values
|xref:reference:sql/sql-functions/math-functions/greatest.adoc[`greatest()`] |This function extracts the greatest or largest value from a set of values.
|xref:reference:sql/sql-functions/math-functions/least.adoc[`least()`] |This function returns the least or smallest value in a list of values
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/reference/pages/sql/sql-functions/math-functions/index.adoc` around
lines 17 - 18, Update the greatest and least table labels to use lowercase
function-call notation, preserving the trailing parentheses, so they match the
surrounding function references while leaving the descriptions unchanged.


== Arguments

* `x`: A positive or negative number of type `real` or `double precision`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Include zero in the argument description.

The page documents TANH(0) below, but “positive or negative” excludes zero. Describe x as a number, or explicitly include zero.

Proposed fix
-* `x`: A positive or negative number of type `real` or `double precision`.
+* `x`: A number of type `real` or `double precision`, including zero.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* `x`: A positive or negative number of type `real` or `double precision`.
* `x`: A number of type `real` or `double precision`, including zero.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/reference/pages/sql/sql-functions/math-functions/tanh.adoc` at line
16, Update the `x` argument description for `TANH` to include zero by describing
it as a number of type `real` or `double precision`, while preserving the
existing type information.

Comment thread modules/reference/pages/sql/sql-functions/math-functions/tanh.adoc Outdated
Comment thread modules/reference/pages/sql/sql-functions/string-functions/index.adoc Outdated
Comment thread modules/reference/pages/sql/sql-functions/string-functions/index.adoc Outdated
Comment thread modules/reference/pages/sql/sql-functions/timestamp-functions/index.adoc Outdated
|===
|Function |Description
|xref:reference:sql/sql-functions/other-functions/coalesce.adoc[`COALESCE`] |Returns the first argument that is not NULL, while the remaining arguments from the first non-null argument are not evaluated.
|xref:reference:sql/sql-functions/other-functions/coalesce.adoc[`coalesce`] |Returns the first argument that is not NULL, while the remaining arguments from the first non-null argument are not evaluated.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In the first column, coalesce should have parentheses after it (coalesce()) to be consistent with the rest of the column. Also, note the formatting: this has backticks around "coalesce" so it shows up in monospace font, but the other rows in this table don't have backticks in the first column and render in plain font.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @rsamuels-panda - I just did a sweep to make the backticks and parens consistent

Comment thread modules/reference/pages/sql/sql-functions/other-functions/index.adoc Outdated
@kbatuigas
kbatuigas requested a review from rsamuels-panda July 23, 2026 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants