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

babelfish-for-postgresql / babelfish_extensions / 19462655229 / 1
77%
BABEL_5_X_DEV: 77%

Build:
DEFAULT BRANCH: BABEL_5_X_DEV
Ran 18 Nov 2025 10:50AM UTC
Files 121
Run time 8s
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

18 Nov 2025 10:24AM UTC coverage: 76.726% (+0.02%) from 76.703%
19462655229.1

push

github

web-flow
Implement bidirectional cast/convert for char/nchar ↔ binary/varbinary

This commit introduces support for casting/converting between char/nchar types
and binary/varbinary, improving compatibility with T-SQL-style conversions in
Babelfish.

What is the change?
Previously, Babelfish did not support direct casts or converts between char/
nchar and binary/varbinary types. With this change, the system can now handle
such casts bidirectionally, enabling more seamless T-SQL compatibility.

Why was the change made?
This change was driven by the need to increase compatibility with T-SQL’s
casting behavior, as part of issue #3835. T-SQL workloads often rely on
implicit and explicit casts between string and binary types, so supporting
these casts is essential for broader T-SQL compatibility.

How was the code changed?

babelfish_conv_helper_to_nvarchar covers conversions to nvarchar.
Implemented and registered cast functions from nchar to binary/varbinary.
Implemented and registered cast functions from binary/varbinary to char/nchar.
Adjust bpchar/varchar to binary cast functions and use encoding.
Updated conversion helper logic.
Added test cases covering each cast direction.
Add missing support for TRY_CAST, CONVERT and TRY_CONVERT for (nvar)char & 
var(binary).

Issues Resolved:
BABEL-6084
https://github.com/babelfish-for-postgresql/babelfish_extensions/issues/3835

Author: Bilal Kahraman <kahramannbilal@gmail.com>
Reviewed-by: Tanzeel Khan <tzlkhan@amazon.com>
Reviewed-by: Rohit Bhagat <rohitbgt@amazon.com>
Reviewed-by: Pranav Jain <pranav23iitd@gmail.com>

51959 of 67720 relevant lines covered (76.73%)

386514.11 hits per line

Source Files on job 19462655229.1
  • Tree
  • List 121
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 19462655229
  • 5db17921 on github
  • Prev Job for on BABEL_5_X_DEV (#19457764876.1)
  • Next Job for on BABEL_5_X_DEV (#19475856607.1)
  • 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