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

babelfish-for-postgresql / babelfish_extensions / 25537376300
77%
BABEL_6_X_DEV: 77%

Build:
Build:
LAST BUILD BRANCH: SELECT-COUNT(-)-AS-matches
DEFAULT BRANCH: BABEL_6_X_DEV
Ran 08 May 2026 05:30AM UTC
Jobs 1
Files 127
Run time 3min
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

08 May 2026 04:48AM UTC coverage: 77.056% (-0.1%) from 77.159%
25537376300

push

github

web-flow
[OSS-ONLY] Add persistent ANTLR parse tree cache for routines (#4547)

Cache serialized parse trees in sys.babelfish_function_ext to eliminate
redundant ANTLR parsing on first execution in new sessions. The PLtsql
function hash table is session-scoped, so without caching every new
session re-parses large routines from scratch. This reduces first-
execution time from ~2s to ~15ms for routines with ~1300 lines.

Serialized trees use a nodeToString/stringToNode framework modeled after
PostgreSQL's node serialization, with a Perl code generator producing
outfuncs/readfuncs/equalfuncs from annotated PLtsql headers. Extension-
owned NodeTags are offset from 10000 to avoid collision with PG's enum.
Cache is written at CREATE/ALTER time, restored on first EXEC in a new
session, and validated against BABELFISH_VERSION_STR to reject stale
entries after upgrades. Cache writes are skipped on read-only instances.

Caching behavior is controlled at three levels: a session-level GUC
(babelfishpg_tsql.enable_antlr_parse_cache, default true) provides the
global toggle, a per-function setting toggled via
sys.enable_antlr_parse_cache(routine_oid, true/false/NULL) allows
function owners to force-enable, force-disable, or follow the session
GUC, and a superuser-only debug GUC (validate_antlr_parse_cache)
enables roundtrip verification by comparing cached trees against fresh
ANTLR output.

Limitations: trigger functions and event triggers are not cached in this
initial implementation due to differences in datum array layout between
CREATE and EXEC time. These will be addressed in a follow-up.

Task: BABEL-6037

Author: Manisha Deshpande mmdeshp@amazon.com

582 of 909 new or added lines in 16 files covered. (64.03%)

1 existing line in 1 file now uncovered.

53832 of 69861 relevant lines covered (77.06%)

401888.91 hits per line

Uncovered Changes

Lines Coverage ∆ File
83
51.18
contrib/babelfishpg_tsql/src/pltsql_node/pltsql_nodeio.c
74
1.27
0.0% contrib/babelfishpg_tsql/src/pl_gram.y
66
13.16
contrib/babelfishpg_tsql/src/pltsql_node/pltsql_equalfuncs.c
32
70.29
-0.6% contrib/babelfishpg_tsql/src/pl_comp.c
30
62.96
contrib/babelfishpg_tsql/src/pltsql_node/pltsql_readfuncs_stubs.c
17
85.87
0.26% contrib/babelfishpg_tsql/src/hooks.c
10
81.13
contrib/babelfishpg_tsql/src/pltsql_node/pltsql_outfuncs_stubs.c
7
75.0
contrib/babelfishpg_tsql/src/pltsql_node/pltsql_node_macros.h
4
44.57
0.0% contrib/babelfishpg_tsql/src/pl_exec.c
3
0.0
0.0% contrib/babelfishpg_tsql/src/tsqlNodes.c
1
86.89
0.36% contrib/babelfishpg_tsql/src/catalog.c

Coverage Regressions

Lines Coverage ∆ File
1
79.23
-0.2% contrib/babelfishpg_tds/src/backend/tds/tdsutils.c
Jobs
ID Job ID Ran Files Coverage
1 25537376300.1 08 May 2026 05:30AM UTC 127
77.06
GitHub Action Run
Source Files on build 25537376300
  • Tree
  • List 127
  • Changed 13
  • Source Changed 11
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25537376300
  • 56b641e7 on github
  • Prev Build on BABEL_5_X_DEV (#25121126774)
  • Next Build on BABEL_5_X_DEV (#25555713367)
  • 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