• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

babelfish-for-postgresql / babelfish_extensions / 23345462128
77%
BABEL_5_X_DEV: 77%

Build:
Build:
LAST BUILD BRANCH: BABEL-6331_MAKEVALID_6X
DEFAULT BRANCH: BABEL_5_X_DEV
Ran 20 Mar 2026 02:09PM UTC
Jobs 1
Files 121
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Mar 2026 01:41PM UTC coverage: 77.06%. Remained the same
23345462128

push

github

web-flow
Supported PostGIS Function: STNumPoints for Geospatial datatypes (#4510) (#4676)

Implemented the STNumPoints GeoSpatial TSQL function that was previously unsupported in Babelfish.

## What's Changed

### Function Implementation
- Added `sys.STNumPoints(geog sys.GEOGRAPHY)` function in `geography.sql`
- Delegates to `sys.STNumPoints_geography_helper()` for valid, non-empty instances
- Function is marked as `IMMUTABLE STRICT PARALLEL SAFE` for optimal performance

### Error Handling
- Returns exception for invalid geography instances
- Returns 0 for empty geography instances
- Returns actual point count for valid instances

---

## Function Behavior

| Input | Output |
|-------|--------|
| Valid geography instance | Integer count of points |
| Empty geography instance | 0 |
| Invalid geography instance | Exception |

---

## Examples

**Point**

    DECLARE @point geography;
    SET @point = geography::STPointFromText('POINT(-122.34900 47.65100)', 4326);
    SELECT @point.STNumPoints() AS NumPoints;
    -- Output: 1

**LineString**

    DECLARE @line geography;
    SET @line = geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656, -122.310 47.690)', 4326);
    SELECT @line.STNumPoints() AS NumPoints;
    -- Output: 3

**Polygon**

    DECLARE @polygon geography;
    SET @polygon = geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326);
    SELECT @polygon.STNumPoints() AS NumPoints;
    -- Output: 5

**Empty Instance**

    DECLARE @empty geography;
    SET @empty = geography::STGeomFromText('POINT EMPTY', 4326);
    SELECT @empty.STNumPoints() AS NumPoints;
    -- Output: 0

Task: BABEL-6329
Signed-off by: Gopal verma <gopalgv@amazon.com>

52927 of 68683 relevant lines covered (77.06%)

622286.76 hits per line

Jobs
ID Job ID Ran Files Coverage
1 23345462128.1 20 Mar 2026 02:09PM UTC 121
77.06
GitHub Action Run
Source Files on build 23345462128
  • Tree
  • List 121
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23345462128
  • 228133fa on github
  • Prev Build on BABEL_6_X_DEV (#23338742282)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc