[fix] correct numeric, spatial, and quantile function doc errors#3713
Merged
Conversation
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.
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 25 small documentation issues across the numeric, spatial, and quantile function references. Each item below is independent.
numeric-functions
gcd(17,31)while the query wasgcd(-17, 31). Header now matches the query (table widened by 1 character to fit).+infreturns NULL, but the example with+infreturnsInfinity. Note updated to reflect actual behavior.<b>must be "less than the lower bound"; corrected to "greater than".LN/LOGwith one arg). Dropped "natural".LOG(<b>[, <x>]), butlog(3)actually returnsln(3). Rewrote Syntax asLOG([<b>, ]<x>)and clarified parameter semantics: 1-arg form = natural log; 2-arg form = log basebofx.sql instead oftext; corrected so they render as plain monospaced output.0/1while the others showedfalse/true; unified to boolean."XOR | Numeric Functions"(siblings use just the function name); changed to"XOR". The example's SQL and result table were inside the samesql fence; split intosql + ```text fences.litera→literal.spatial-functions
## Sytax(instead ofSyntax) and## Retuen Value(instead ofReturn Value) in roughly 18 files; corrected. (The same typo## Sytaxalso appeared indate-time-functions/unix-timestamp.md— fixed there as well.)## 参数in an English doc →## Parameters. Parameter rows were orderedx_lng, y_lng, x_lat, y_lat; reordered to match the Syntaxx_lng, x_lat, y_lng, y_lat.# Parameters(H1) →## Parameters(H2).st_area_square_Km(capital K); changed to lowercase. Type list typosGeopolygon,GeoCircle,GeoMuitiPolygonandGeoMultiCirclecorrected toGeoPolygon, GeoCircle, GeoMultiPolygon.<center_lat>valid range was given as[-180, 180]; corrected to[-90, 90].y_lngwas described as "Latitude of X", etc.); descriptions now match the canonicalx_lng / x_lat / y_lng / y_latorder. One example labeled "Two identical points (returns 0)" actually used different coordinates and returned a non-zero distance; relabeled.ST_Distance(ST_Point(0,0), ST_Point(1,0))while the query usedST_GeometryFromText(...); header now matches.LINE→LINESTRINGin the parameter description. The "multiple vertices" example showed raw binary geometry output; wrapped withST_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.。,)) inside English text replaced with ASCII.quantile-functions
TO_QUANTILE_STATE(<raw_data> <compression>)was missing the comma between args.Test plan
LOGsyntax,ST_LineFromTextresult now readable WKT, spatial parameter rows in canonical order)