Skip to content

[fix] correct numeric, spatial, and quantile function doc errors#3713

Merged
morningman merged 1 commit into
apache:masterfrom
boluor:fix-batch21-22-23-simple
May 20, 2026
Merged

[fix] correct numeric, spatial, and quantile function doc errors#3713
morningman merged 1 commit into
apache:masterfrom
boluor:fix-batch21-22-23-simple

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented May 20, 2026

Summary

Fixes 25 small documentation issues across the numeric, spatial, and quantile function references. Each item below is independent.

numeric-functions

  • gcd.md — result-table header showed gcd(17,31) while the query was gcd(-17, 31). Header now matches the query (table widened by 1 character to fit).
  • ln.md — special-case note said +inf returns NULL, but the example with +inf returns Infinity. Note updated to reflect actual behavior.
  • random.md — parameter description said the upper bound <b> must be "less than the lower bound"; corrected to "greater than".
  • log10.md / log2.md — description called these the "natural logarithm"; they are not (natural log is LN/LOG with one arg). Dropped "natural".
  • log.md — Syntax was LOG(<b>[, <x>]), but log(3) actually returns ln(3). Rewrote Syntax as LOG([<b>, ]<x>) and clarified parameter semantics: 1-arg form = natural log; 2-arg form = log base b of x.
  • asinh.md — six result-table blocks were fenced as sql instead of text; corrected so they render as plain monospaced output.
  • even.md / lcm.md — misaligned result-table borders aligned.
  • signbit.md — one example showed 0/1 while the others showed false/true; unified to boolean.
  • xor.md — frontmatter title was "XOR | Numeric Functions" (siblings use just the function name); changed to "XOR". The example's SQL and result table were inside the same sql fence; split into sql + ```text fences.
  • truncate.md — typo literaliteral.

spatial-functions

  • Spatial docs had ## Sytax (instead of Syntax) and ## Retuen Value (instead of Return Value) in roughly 18 files; corrected. (The same typo ## Sytax also appeared in date-time-functions/unix-timestamp.md — fixed there as well.)
  • st-angle-sphere.md — Chinese heading ## 参数 in an English doc → ## Parameters. Parameter rows were ordered x_lng, y_lng, x_lat, y_lat; reordered to match the Syntax x_lng, x_lat, y_lng, y_lat.
  • st-astext.md — section heading # Parameters (H1) → ## Parameters (H2).
  • st-area-square-km.md — result-table headers had st_area_square_Km (capital K); changed to lowercase. Type list typos Geopolygon,GeoCircle,GeoMuitiPolygon and GeoMultiCircle corrected to GeoPolygon, GeoCircle, GeoMultiPolygon.
  • st-circle.md<center_lat> valid range was given as [-180, 180]; corrected to [-90, 90].
  • st-distance-sphere.md — parameter rows had mismatched name/description (y_lng was described as "Latitude of X", etc.); descriptions now match the canonical x_lng / x_lat / y_lng / y_lat order. One example labeled "Two identical points (returns 0)" actually used different coordinates and returned a non-zero distance; relabeled.
  • st-distance.md — result-table header showed ST_Distance(ST_Point(0,0), ST_Point(1,0)) while the query used ST_GeometryFromText(...); header now matches.
  • st-linefromtext.md — WKT keyword LINELINESTRING in the parameter description. The "multiple vertices" example showed raw binary geometry output; wrapped with ST_AsText(...) so the result displays human-readable WKT (consistent with the convention used in Apache Sedona and similar to what PostGIS shows except more readable). Mislabeled example caption corrected.
  • st-touches.md / st-contains.md / st-intersects.md / st-point.md / st-asbinary.md — full-width punctuation (, ) inside English text replaced with ASCII.
  • st-disjoint.md — result block was missing its closing table border; added.

quantile-functions

  • to-quantile-state.md — Syntax TO_QUANTILE_STATE(<raw_data> <compression>) was missing the comma between args.

Test plan

  • CI doc build passes
  • Spot-check the affected pages render correctly (table alignment, Syntax/Return-Value headings, LOG syntax, ST_LineFromText result now readable WKT, spatial parameter rows in canonical order)

numeric-functions:
- gcd.md: result-table header showed `gcd(17,31)` while the query was `gcd(-17, 31)`; header now matches the query and the table is widened by 1 to fit.
- ln.md: special-case note said `+inf returns NULL`, but the example with `+inf` returns `Infinity`; note updated to reflect actual behavior.
- random.md: parameter description said the upper bound `<b>` must be "less than the lower bound"; corrected to "greater than".
- log10.md / log2.md: description called these the "natural logarithm" — they are not. Dropped "natural".
- log.md: Syntax was `LOG(<b>[,<x>])` while `log(3)` actually returns ln(3); rewrote Syntax as `LOG([<b>, ]<x>)` and clarified parameter semantics (1-arg form = natural log, 2-arg form = log base b of x).
- asinh.md: six result-table blocks were fenced as ```sql; changed to ```text.
- even.md / lcm.md: misaligned result-table borders aligned.
- signbit.md: one example showed `0`/`1` while the others showed `false`/`true`; unified to boolean.
- xor.md: frontmatter title was `"XOR | Numeric Functions"` (siblings use just the function name); changed to `"XOR"`. The example's SQL and result table were inside the same ```sql fence; split into ```sql and ```text fences.
- truncate.md: typo `litera` → `literal`.

spatial-functions:
- Spatial docs had `## Sytax` (instead of Syntax) and `## Retuen Value` (instead of Return Value) in ~18 files; corrected. (The same typo also appeared in `date-time-functions/unix-timestamp.md` — fixed there too.)
- st-angle-sphere.md: Chinese heading `## 参数` in an English doc → `## Parameters`. Parameter rows were in the order `x_lng, y_lng, x_lat, y_lat`; reordered to match the Syntax order `x_lng, x_lat, y_lng, y_lat`.
- st-astext.md: section heading `# Parameters` (H1) → `## Parameters` (H2).
- st-area-square-km.md: result-table headers had `st_area_square_Km` (capital K) → lowercase. Also typos in the type list: `Geopolygon,GeoCircle,GeoMuitiPolygon` and `GeoMultiCircle` → `GeoPolygon, GeoCircle, GeoMultiPolygon`.
- st-circle.md: `<center_lat>` valid range was given as `[-180, 180]`; corrected to `[-90, 90]`.
- st-distance-sphere.md: parameter rows had mismatched name/description (`y_lng` was described as "Latitude of X", etc.); descriptions now match the canonical `x_lng / x_lat / y_lng / y_lat` order. One example labeled "Two identical points (returns 0)" actually used different coordinates and returned a non-zero distance; relabeled.
- st-distance.md: result-table header showed `ST_Distance(ST_Point(0,0), ST_Point(1,0))` while the query used `ST_GeometryFromText(...)`; header now matches.
- st-linefromtext.md: WKT keyword `LINE` → `LINESTRING` in the parameter description. The "multiple vertices" example showed raw binary geometry output; wrapped with `ST_AsText(...)` so the result displays human-readable WKT. Mislabeled example caption corrected.
- st-touches.md / st-contains.md / st-intersects.md / st-point.md / st-asbinary.md: full-width punctuation (`。`, `)`) inside English text replaced with ASCII.
- st-disjoint.md: result block was missing its closing table border; added.

quantile-functions:
- to-quantile-state.md: Syntax `TO_QUANTILE_STATE(<raw_data> <compression>)` was missing the comma between args.
@morningman morningman merged commit f042acb 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