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

babelfish-for-postgresql / babelfish_extensions / 15776899566
77%

Build:
DEFAULT BRANCH: BABEL_5_X_DEV
Ran 20 Jun 2025 11:02AM UTC
Jobs 1
Files 120
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

20 Jun 2025 10:27AM UTC coverage: 75.811% (+0.2%) from 75.653%
15776899566

push

github

web-flow
Address issues with arithmetic, mathematical functions for money/smallmoney (#3797)

Handling overflow and incorrect outputs in case of certain money and smallmoney arithmetic and math functions.

There were certain issues found both w.r.t overflow handling and certain functions and operations giving incorrect result for money and smallmoney datatype. This commit addresses those issues.

Issue #1: Overflow of smallmoney arithmetic leading to TDS hang.
Issue #2: Unhandled overflow cases leading to incorrect output.
Issue #3: Fixeddecimal operators being resolved for smallmoney functions and operations leading to incorrect results.

In this commit, we have added new functions for all smallmoney operators and fixed certain overflows with money (fixeddecimal).

New operators added -

arithmetic operators for bit
a. bit and float operators
b. bit and smallmoney operators
c. bit and bit operators.
The reason to introduce bit,bit and bit,float operators is because once we introduced bit,smallmoney; certain operators did not remain unique - like bit, bit and bit, float.
Previously, their output was datetime which was also not valid. Hence, we've corrected the output and introduced these operators.

New functions added -

All arithmetic functions for smallmoney
a. smallmoney and int2, int4 and int8
b. smallmoney and smallmoney
power, ceiling and floor functions for fixeddecimal
Update
we will not be introducing bit, bit operators
Issues Resolved
BABEL-5745, BABEL-5757, BABEL-5756, BABEL-5747, BABEL-5754

Test Scenarios Covered
Note: testcases are imported from PR-3568

---------

Signed-off-by: Ayush Shah <ayushdsh@amazon.com>

405 of 439 new or added lines in 3 files covered. (92.26%)

3 existing lines in 2 files now uncovered.

49382 of 65138 relevant lines covered (75.81%)

315751.18 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
78.51
3.6% contrib/babelfishpg_money/fixeddecimal.c
7
93.39
0.47% contrib/babelfishpg_common/src/bit.c
25
90.46
contrib/babelfishpg_money/smallmoney.c

Uncovered Existing Lines

Lines Coverage ∆ File
1
72.43
-0.2% contrib/babelfishpg_tds/src/backend/tds/tdsutils.c
2
78.51
3.6% contrib/babelfishpg_money/fixeddecimal.c
Jobs
ID Job ID Ran Files Coverage
1 15776899566.1 20 Jun 2025 11:02AM UTC 120
75.81
GitHub Action Run
Source Files on build 15776899566
  • Tree
  • List 120
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #15776899566
  • 12a87436 on github
  • Prev Build on BABEL_5_X_DEV (#15776788469)
  • Next Build on BABEL_5_X_DEV (#15827757636)
  • 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