[SQL] tanh function#639
Conversation
When in prose or page titles/headings, use lowercase for function names regardless of whether they follow SQL-standard constructs/grammar
✅ Deploy Preview for rp-cloud ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds a new Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (16)
modules/ROOT/nav.adocmodules/reference/pages/sql/sql-data-types/interval.adocmodules/reference/pages/sql/sql-data-types/text.adocmodules/reference/pages/sql/sql-functions/math-functions/greatest.adocmodules/reference/pages/sql/sql-functions/math-functions/index.adocmodules/reference/pages/sql/sql-functions/math-functions/least.adocmodules/reference/pages/sql/sql-functions/math-functions/tanh.adocmodules/reference/pages/sql/sql-functions/other-functions/coalesce.adocmodules/reference/pages/sql/sql-functions/other-functions/index.adocmodules/reference/pages/sql/sql-functions/other-functions/nullif.adocmodules/reference/pages/sql/sql-functions/string-functions/index.adocmodules/reference/pages/sql/sql-functions/string-functions/position.adocmodules/reference/pages/sql/sql-functions/string-functions/strpos.adocmodules/reference/pages/sql/sql-functions/string-functions/substring.adocmodules/reference/pages/sql/sql-functions/timestamp-functions/extract.adocmodules/reference/pages/sql/sql-functions/timestamp-functions/index.adoc
| |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 |
There was a problem hiding this comment.
🎯 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.
| |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`. |
There was a problem hiding this comment.
🎯 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.
| * `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.
| |=== | ||
| |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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Thanks @rsamuels-panda - I just did a sweep to make the backticks and parens consistent
Description
This pull request updates the SQL function documentation to standardize function names to lowercase and adds documentation for the
tanhfunction. 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:
greatest,least,coalesce, andnullif(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:
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:
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