Skip to content

Commit baa31ee

Browse files
authored
Merge pull request #685 from duckdb/v1.3.2
Port-forward typo fixes
2 parents d0f8202 + 2d2cc45 commit baa31ee

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/spatial/modules/main/spatial_functions_scalar.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ struct ST_Area {
525525
)";
526526

527527
static constexpr const char *EXAMPLE = R"(
528-
select ST_Area('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))'::geometry);
528+
SELECT ST_Area('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))'::GEOMETRY);
529529
-- 1.0
530530
)";
531531

@@ -851,20 +851,20 @@ struct ST_AsGeoJSON {
851851
)";
852852

853853
static constexpr auto EXAMPLE = R"(
854-
select ST_AsGeoJSON('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))'::geometry);
854+
SELECT ST_AsGeoJSON('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))'::GEOMETRY);
855855
----
856-
{"type":"Polygon","coordinates":[[[0.0,0.0],[0.0,1.0],[1.0,1.0],[1.0,0.0],[0.0,0.0]]]}
856+
{"type":"Polygon","coordinates":[[[0.0, 0.0], [0.0, 1.0], [1.0, 1.0], [1.0, 0.0], [0.0, 0.0]]]}
857857
858858
-- Convert a geometry into a full GeoJSON feature (requires the JSON extension to be loaded)
859859
SELECT CAST({
860860
type: 'Feature',
861-
geometry: ST_AsGeoJSON(ST_Point(1,2)),
861+
geometry: ST_AsGeoJSON(ST_Point(1, 2)),
862862
properties: {
863863
name: 'my_point'
864864
}
865865
} AS JSON);
866866
----
867-
{"type":"Feature","geometry":{"type":"Point","coordinates":[1.0,2.0]},"properties":{"name":"my_point"}}
867+
{"type":"Feature","geometry":{"type":"Point","coordinates":[1.0, 2.0]},"properties":{"name":"my_point"}}
868868
)";
869869

870870
//------------------------------------------------------------------------------------------------------------------
@@ -956,7 +956,7 @@ struct ST_AsText {
956956
)";
957957

958958
static constexpr const char *EXAMPLE = R"(
959-
SELECT ST_MakeEnvelope(0,0,1,1);
959+
SELECT ST_MakeEnvelope(0, 0, 1, 1);
960960
----
961961
POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))
962962
)";
@@ -1097,7 +1097,7 @@ struct ST_AsHEXWKB {
10971097
)";
10981098

10991099
static constexpr const char *EXAMPLE = R"(
1100-
SELECT ST_AsHexWKB('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))'::geometry);
1100+
SELECT ST_AsHexWKB('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))'::GEOMETRY);
11011101
----
11021102
01030000000100000005000000000000000000000000000...
11031103
)";
@@ -1976,7 +1976,7 @@ struct ST_CollectionExtract {
19761976
)";
19771977

19781978
static constexpr auto EXAMPLE = R"(
1979-
select st_collectionextract('MULTIPOINT(1 2,3 4)'::geometry, 1);
1979+
SELECT ST_CollectionExtract('MULTIPOINT(1 2, 3 4)'::GEOMETRY, 1);
19801980
-- MULTIPOINT (1 2, 3 4)
19811981
)";
19821982

@@ -2204,7 +2204,7 @@ struct ST_Dimension {
22042204
)";
22052205

22062206
static constexpr auto EXAMPLE = R"(
2207-
select st_dimension('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))'::geometry);
2207+
SELECT ST_Dimension('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))'::GEOMETRY);
22082208
----
22092209
2
22102210
)";
@@ -2960,15 +2960,15 @@ struct ST_Dump {
29602960
static constexpr auto DESCRIPTION = R"(
29612961
Dumps a geometry into a list of sub-geometries and their "path" in the original geometry.
29622962
2963-
You can use the `UNNEST(res, recursive := true)` function to explode resulting list of structs into multiple rows.
2963+
You can use the `unnest(res, recursive := true)` function to explode the resulting list of structs into multiple rows.
29642964
)";
29652965

29662966
static constexpr auto EXAMPLE = R"(
2967-
select st_dump('MULTIPOINT(1 2,3 4)'::geometry);
2967+
SELECT ST_Dump('MULTIPOINT(1 2, 3 4)'::GEOMETRY);
29682968
----
29692969
[{'geom': 'POINT(1 2)', 'path': [0]}, {'geom': 'POINT(3 4)', 'path': [1]}]
29702970
2971-
select unnest(st_dump('MULTIPOINT(1 2,3 4)'::geometry), recursive := true);
2971+
SELECT unnest(ST_Dump('MULTIPOINT(1 2, 3 4)'::GEOMETRY), recursive := true);
29722972
-- ┌─────────────┬─────────┐
29732973
-- │ geom │ path │
29742974
-- │ geometry │ int32[] │
@@ -4555,7 +4555,7 @@ struct ST_GeomFromGeoJSON {
45554555
)";
45564556

45574557
static constexpr auto EXAMPLE = R"(
4558-
SELECT ST_GeomFromGeoJSON('{"type":"Point","coordinates":[1.0,2.0]}');
4558+
SELECT ST_GeomFromGeoJSON('{"type": "Point", "coordinates": [1.0, 2.0]}');
45594559
----
45604560
POINT (1 2)
45614561
)";
@@ -8041,11 +8041,11 @@ struct ST_Points {
80418041
)";
80428042

80438043
static constexpr auto EXAMPLE = R"(
8044-
select st_points('LINESTRING(1 1, 2 2)'::geometry);
8044+
SELECT ST_Points('LINESTRING(1 1, 2 2)'::GEOMETRY);
80458045
----
80468046
MULTIPOINT (1 1, 2 2)
80478047
8048-
select st_points('MULTIPOLYGON Z EMPTY'::geometry);
8048+
SELECT ST_Points('MULTIPOLYGON Z EMPTY'::GEOMETRY);
80498049
----
80508050
MULTIPOINT Z EMPTY
80518051
)";
@@ -8173,7 +8173,7 @@ struct ST_QuadKey {
81738173
)";
81748174

81758175
static constexpr auto EXAMPLE = R"(
8176-
SELECT ST_QuadKey(st_point(11.08, 49.45), 10);
8176+
SELECT ST_QuadKey(ST_Point(11.08, 49.45), 10);
81778177
----
81788178
1333203202
81798179
)";

src/spatial/modules/osm/osm_module.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ static unique_ptr<TableRef> ReadOsmPBFReplacementScan(ClientContext &context, Re
859859
// static constexpr DocTag DOC_TAGS[] = {{"ext", "spatial"}};
860860

861861
static constexpr const char *DOC_DESCRIPTION = R"(
862-
The `ST_ReadOsm()` table function enables reading compressed OpenStreetMap data directly from a `.osm.pbf file.`
862+
The `ST_ReadOsm()` table function enables reading compressed OpenStreetMap data directly from a `.osm.pbf` file.
863863
864864
This function uses multithreading and zero-copy protobuf parsing which makes it a lot faster than using the `ST_Read()` OSM driver, however it only outputs the raw OSM data (Nodes, Ways, Relations), without constructing any geometries. For simple node entities (like PoI's) you can trivially construct POINT geometries, but it is also possible to construct LINESTRING and POLYGON geometries by manually joining refs and nodes together in SQL, although with available memory usually being a limiting factor.
865865
The `ST_ReadOSM()` function also provides a "replacement scan" to enable reading from a file directly as if it were a table. This is just syntax sugar for calling `ST_ReadOSM()` though. Example:

0 commit comments

Comments
 (0)