Commit ce7523a
authored
added new grammer, parse node and hook for top N Percent (#624)
Description
This PR implements comprehensive support for SELECT TOP N PERCENT syntax in Babelfish, addressing JIRA-BABEL-1358. The implementation adds percentage-based row limiting functionality to align with SQL Server behavior.
Problem
Babelfish previously only supported SELECT TOP N (fixed count) but lacked support for SELECT TOP N PERCENT (percentage-based limiting), which is a commonly used SQL Server feature for selecting a percentage of rows from result sets.
Related PR -
Extension Link - babelfish-for-postgresql/babelfish_extensions#4111
Issue: BABEL-1358
Signed-off-by: Herambh Shah <herambhs@amazon.com>1 parent c7667f4 commit ce7523a
3 files changed
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
1442 | 1443 | | |
1443 | 1444 | | |
1444 | 1445 | | |
1445 | | - | |
1446 | | - | |
| 1446 | + | |
| 1447 | + | |
1447 | 1448 | | |
1448 | | - | |
| 1449 | + | |
1449 | 1450 | | |
1450 | 1451 | | |
1451 | 1452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
| 444 | + | |
444 | 445 | | |
445 | 446 | | |
446 | 447 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
0 commit comments