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

babelfish-for-postgresql / babelfish_extensions / 15850206611
77%

Build:
DEFAULT BRANCH: BABEL_5_X_DEV
Ran 24 Jun 2025 12:52PM 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

24 Jun 2025 12:17PM UTC coverage: 75.813% (-0.001%) from 75.814%
15850206611

push

github

web-flow
Fix decimal-to-integer cast behavior to match TSQL truncation (#3829)

Previously, Babelfish incorrectly handled explicit conversions with TRY_CAST and TRY_CONVERT from sys.decimal to
integer types (SMALLINT, INT, BIGINT). While TSQL truncates the fractional part during such conversions, Babelfish was
rounding the value instead. This behavior mismatch could lead to inconsistencies in application logic when migrating
from TSQL to Babelfish.

With this change, sys.decimal is explicitly handled in the sys.babelfish_cast_floor_* functions for SMALLINT, INT, and
BIGINT, ensuring the use of TRUNC() to match TSQL's truncation behavior during decimal-to-integer conversions.

The following functions were updated to include sys.decimal in their CASE pg_typeof(arg) clauses:
sys.babelfish_cast_floor_smallint, sys.babelfish_cast_floor_int and sys.babelfish_cast_floor_bigint

Each of these functions now applies TRUNC(arg) for sys.decimal, consistent with how TSQL behaves.

Task: BABEL-5930
Signed-off-by: Bilal Kahraman <kahramannbilal@gmail.com>

49383 of 65138 relevant lines covered (75.81%)

315263.51 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
72.43
-0.4% contrib/babelfishpg_tds/src/backend/tds/tdsutils.c
Jobs
ID Job ID Ran Files Coverage
1 15850206611.1 24 Jun 2025 12:52PM UTC 120
75.81
GitHub Action Run
Source Files on build 15850206611
  • Tree
  • List 120
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #15850206611
  • 092ca0c5 on github
  • Prev Build on BABEL_5_X_DEV (#15827757636)
  • Next Build on BABEL_5_X_DEV (#15871981855)
  • 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