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

babelfish-for-postgresql / babelfish_extensions / 12741819145
77%

Build:
DEFAULT BRANCH: BABEL_5_X_DEV
Ran 13 Jan 2025 07:01AM 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

13 Jan 2025 06:27AM UTC coverage: 74.947%. Remained the same
12741819145

push

github

web-flow
Fixed CASE statement to work correctly when branch expression is of Numeric and Decimal type (#3389)

* Fixed CASE statement to work correctly when branch expression is of Numeric and Decimal type (#3236)

Issue:
- The CASE statement was unable to calculate the correct common typmod when the common type of the CASE statement was NUMERIC or DECIMAL. For CASE expressions, we relied on a PostgreSQL function to calculate the typmod when the common type was NUMERIC or DECIMAL. However, this approach showed different behavior from T-SQL. Therefore, we need to calculate the common typmod according to T-SQL documentation to ensure consistency with T-SQL behavior.

Changes made to fix the issues:
- The tsql_select_common_typmod_hook() function has been modified to return a common typmod for all branches when the branch expression is of NUMERIC or DECIMAL data types. This calculation now follows the T-SQL documentation. Additionally, we've added a 'case T_CoerceToDomain' in the 'resolve_numeric_typmod_from_exp' function to address issues related to user-defined types (UDTs).
- We have enhanced the 'resolve_numeric_typmod_from_exp' function by adding support for 'T_SubLink' and 'T_CoerceToDomain' nodes. This improvement enables accurate typmod calculation for expressions involving subqueries (T_SubLink) and user-defined types (T_CoerceToDomain).

Issues Resolved
Task: BABEL-5341

cherry-picked from: #3236

Signed-off-by: yashneet vinayak <yashneet@amazon.com>
Co-authored-by: yashneet vinayak <yashneet@amazon.com>

126 of 131 new or added lines in 3 files covered. (96.18%)

27 existing lines in 2 files now uncovered.

46940 of 62631 relevant lines covered (74.95%)

167201.44 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
5
80.04
-0.95% contrib/babelfishpg_tds/src/backend/tds/tdsresponse.c

Uncovered Existing Lines

Lines Coverage ∆ File
1
83.33
0.5% contrib/babelfishpg_tsql/src/pltsql_coerce.c
26
80.04
-0.95% contrib/babelfishpg_tds/src/backend/tds/tdsresponse.c
Jobs
ID Job ID Ran Files Coverage
1 12741819145.1 13 Jan 2025 07:01AM UTC 115
74.95
GitHub Action Run
Source Files on build 12741819145
  • Tree
  • List 115
  • Changed 80
  • Source Changed 3
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #12741819145
  • 4e61d3a6 on github
  • Prev Build on BABEL_5_X_DEV (#12696145122)
  • Next Build on BABEL_5_X_DEV (#12742860948)
  • 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