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

babelfish-for-postgresql / babelfish_extensions / 11071542710
74%
BABEL_5_X_DEV: 77%

Build:
Build:
LAST BUILD BRANCH: BABEL-5577
DEFAULT BRANCH: BABEL_5_X_DEV
Ran 27 Sep 2024 02:19PM UTC
Jobs 1
Files 115
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

27 Sep 2024 11:18AM UTC coverage: 74.448% (-0.001%) from 74.449%
11071542710

push

github

web-flow
Fix Antlr rewrite for WITHIN GROUP() for STRING_AGG() (#2983)

### 1. Issues
- Rewriting logic in antlr of WITHIN GROUP() for STRING_AGG() was incorrect as it involved shifting of order_by_clause. This will cause a problem when there is rewrite in order_by_clause itself as now the index of expressions inside order_by_clause will change and this will result in incorrect rewrite.

### 2. Changes made to fix the issues
- Corrected Parser rewiting logic to avoid shifting of order_by_clause and only omit the unwanted phrases in between.
```
# Input
1> CREATE TABLE string_agg_t (id int, a varchar(10), b varchar(10), g int, sbid int)
2> INSERT INTO string_agg_t values (3,'c','x',1,4), (2,'b','y',2,6)
3> go
1> SELECT STRING_AGG(concat(a,b),'-') WITHIN GROUP (ORDER BY trim(a) ASC) FROM string_agg_t GROUP BY g ORDER BY g
2> go
```
```
# previous output (wrong output)               
Msg 33557097, Level 16, State 1, Server BABELFISH, Line 1
syntax error at or near ")" 
```
```
# current output (correct output)

string_agg                                                                                                                                                                                                                                                      
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cx                                                                                                                                                                                                                                                              
by                                                                                                                                                                             ... (continued)

1 of 1 new or added line in 1 file covered. (100.0%)

44933 of 60355 relevant lines covered (74.45%)

157217.96 hits per line

Jobs
ID Job ID Ran Files Coverage
1 11071542710.1 27 Sep 2024 02:19PM UTC 115
74.45
GitHub Action Run
Source Files on build 11071542710
  • Tree
  • List 115
  • Changed 58
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #11071542710
  • 0a7bedb5 on github
  • Prev Build on BABEL_4_X_DEV (#11069395828)
  • Next Build on server-database-roles-4-x (#11105887083)
  • 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

© 2025 Coveralls, Inc