[fix] correct typos / mislabeled examples / table alignment in conditional and date-time function docs#3709
Merged
Conversation
…ional and date-time function docs
- not-null-or-empty.md / null-or-empty.md: example SQL had an embedded `;` inside the SELECT list (`not_null_or_empty(""); ,` and `null_or_empty(""); ,`) making the statement invalid. Removed the stray `;`.
- null-or-empty.md: the Description (frontmatter + body) said the function returns true when the input is NOT NULL and NOT empty — that is the semantics of `not_null_or_empty`. Inverted the wording.
- conditional-functions/overview.md: the short-circuit result table had a header row one character shorter than its rulers; the rulers and header are now consistent width.
- convert-tz.md: result-table header showed `CAST(... AS DATEV2)` but the query was `AS DATE`; aligned the header with the query.
- date-sub.md: a stray closing ``` fence sat at the very end of the file with no matching opener. Removed.
- date-trunc.md: the parameters table labelled the first argument `<date_or_time_part>` while the Syntax used `<datetime>`. Unified on `<datetime>` to match the syntax.
- millisecond-timestamp.md: the 1960-01-01 example showed `-315619200000000` (a microsecond magnitude) for a function that returns milliseconds; corrected to `-315619200000`.
- maketime.md: the result table included an `id` column that the query never selects. Removed `id` from the result table (header, separator, and all data rows).
- microsecond-timestamp.md: the 1960-01-01 result table header row was 1 character shorter than its rulers; added a trailing space so the table renders square.
- from-iso8601-date.md: inline comments mis-spelled the date-pattern notation as `YYY-MMM`; corrected to `YYYY-Www` to match the notation used elsewhere in the doc.
- minute-ceil.md / minute-floor.md (and a few sibling date-time docs that had the same leak): a Chinese link label `timestamptz的转换` appeared inside English docs; changed to `timestamptz conversion`.
- minute-floor.md: a result-table value used `.000` while sibling docs use `.000000`; aligned to `.000000`.
- minute-floor.md: a mixed-case `MINUTE_floor(...)` invocation; corrected to `MINUTE_FLOOR(...)`.
- month-floor.md: the "Period non-positive" example called `MINUTE_FLOOR` (and the error message echoed `minute_floor`) — copy-paste from minute-floor; corrected to `MONTH_FLOOR` / `month_floor`.
- period-add.md: the Syntax line was `PERIOD_ADD(\`<period>\`, \`month\`)` — second arg missing angle brackets; corrected to \`<month>\`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 16 small documentation issues across the conditional and date-time function references. Each item below is independent.
conditional-functions
;inside the SELECT list (not_null_or_empty("");, ...andnull_or_empty("");, ...) which makes the statement invalid. The stray;is removed.not_null_or_empty). Inverted the wording so it correctly describesnull_or_empty.date-time-functions
CAST(... AS DATEV2)while the query usedAS DATE. Header aligned with the query.\<date_or_time_part>`while the Syntax used``. Unified on``` to match the syntax (and the convention in sibling docs).-315619200000000(a microsecond magnitude) for a function that returns milliseconds. Corrected to-315619200000.idcolumn that the query never selects. Removed theidcolumn from the result table (header, separator, and all data rows).YYY-MMM; corrected toYYYY-Wwwto match the notation used elsewhere in the doc.hour-ceil.md,second-ceil.md,second-floor.md) — a Chinese link label[timestamptz的转换]appeared inside English docs; changed to[timestamptz conversion]..000while sibling docs use.000000. Aligned to.000000.MINUTE_floor(...)invocation; corrected toMINUTE_FLOOR(...).MINUTE_FLOORand the error message echoedminute_floor(copy-paste from minute-floor.md). Corrected toMONTH_FLOOR/month_floor.PERIOD_ADD(\`, `month`)— second arg missing the angle brackets. Corrected to```.Test plan
overview.md,convert-tzresult,date-subend-of-file,date-truncparams, themillisecond-timestamp1960 example value,maketimeresult table,microsecond-timestamp1960 header, ISO-8601 comments, minute/hour/second/month_floor/_ceilexamples and link labels,period-addsyntax)