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

babelfish-for-postgresql / babelfish_extensions / 26519349733 / 1
78%
BABEL_6_X_DEV: 78%

Build:
DEFAULT BRANCH: BABEL_6_X_DEV
Ran 27 May 2026 03:24PM UTC
Files 128
Run time 10s
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

27 May 2026 02:59PM UTC coverage: 76.986% (+0.05%) from 76.933%
26519349733.1

push

github

web-flow
Add support for FOR XML AUTO mode (#4834)

This commit adds support for FOR XML AUTO query. With this change, AUTO mode generates hierarchical XML
where element names and nesting are derived from the table aliases in the SELECT. This commit also supports all
existing directives (ELEMENTS, XSINIL, ROOT) and works with JOINs, CTEs, subqueries, functions, and views.

Implementation summary:

- For each entry in the SELECT target list, parser-side rewrite captures (nest_level, table_alias, col_name) and threads this metadata as a 9th text argument to both FOR XML aggregates (tsql_select_for_xml_agg, tsql_select_for_xml_text_agg). The metadata string is a comma-separated list of "level.table_alias.col_name" entries, e.g. "1.c.CustomerID,1.c.Name,2.o.OrderID,2.o.Amount" for a query joining customer (alias c) and order (alias o).

- Hierarchy is built row-by-row by the aggregate state function. It tracks last-seen values per column and finds
the first column whose value differs from the previous row - that column's nest_level becomes the "first changed
level". The aggregate closes any open elements deeper than that level and opens new elements for every level
from that point down. Sibling rows that share their parent's value get merged under the same parent element.

- Performance: since column types don't change between rows, type output functions (FmgrInfo) and T-SQL
datatype-detection results are cached on the first row to skip catalog (syscache) lookups on every subsequent
value.

Task: BABEL-1151
Signed-off-by: Japleen Kaur <amjj@amazon.com>

54318 of 70556 relevant lines covered (76.99%)

606628.84 hits per line

Source Files on job 26519349733.1
  • Tree
  • List 128
  • Changed 4
  • Source Changed 4
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 26519349733
  • 1812e00b on github
  • Prev Job for on BABEL_6_X_DEV (#26463101191.1)
  • Next Job for on BABEL_6_X_DEV (#26812928458.1)
  • 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