Skip to content

[fix] correct typos / mislabeled examples / table alignment in conditional and date-time function docs#3709

Merged
morningman merged 1 commit into
apache:masterfrom
boluor:fix-batch17-18-simple
May 20, 2026
Merged

[fix] correct typos / mislabeled examples / table alignment in conditional and date-time function docs#3709
morningman merged 1 commit into
apache:masterfrom
boluor:fix-batch17-18-simple

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented May 20, 2026

Summary

Fixes 16 small documentation issues across the conditional and date-time function references. Each item below is independent.

conditional-functions

  • 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("");, ...) which makes the statement invalid. The stray ; is removed.
  • null-or-empty.md — the Description (both frontmatter and body) said the function returns true when the input is NOT NULL and NOT empty (which is the semantics of not_null_or_empty). Inverted the wording so it correctly describes null_or_empty.
  • conditional-functions/overview.md — the short-circuit example's result table had a header row one character shorter than its rulers (rulers were 73 dashes, header was 72). Header and rulers are now the same width.

date-time-functions

  • convert-tz.md — result-table header showed CAST(... AS DATEV2) while the query used AS DATE. Header aligned 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``. Unified on ``` to match the syntax (and the convention in sibling docs).
  • 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 the id column 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 docs that had the same leak: hour-ceil.md, second-ceil.md, second-floor.md) — 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 invoked MINUTE_FLOOR and the error message echoed minute_floor (copy-paste from minute-floor.md). Corrected to MONTH_FLOOR / month_floor.
  • period-add.md — the Syntax line was PERIOD_ADD(\`, `month`)— second arg missing the angle brackets. Corrected to```.

Test plan

  • CI doc build passes
  • Spot-check the affected pages render correctly (conditional examples, the short-circuit result table in overview.md, convert-tz result, date-sub end-of-file, date-trunc params, the millisecond-timestamp 1960 example value, maketime result table, microsecond-timestamp 1960 header, ISO-8601 comments, minute/hour/second/month _floor/_ceil examples and link labels, period-add syntax)

…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>\`.
@morningman morningman merged commit 6095bd6 into apache:master May 20, 2026
3 checks passed
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