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

babelfish-for-postgresql / babelfish_extensions / 12684333519
77%

Build:
DEFAULT BRANCH: BABEL_5_X_DEV
Ran 09 Jan 2025 06:15AM UTC
Jobs 1
Files 115
Run time 14min
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

09 Jan 2025 05:42AM UTC coverage: 74.925% (+0.02%) from 74.902%
12684333519

push

github

web-flow
Fix the nvarchar-varbinary casting (#3072) (#3358)

PROBLEM: while casting nvarchar to varbinary we were considering the UTF8 encoding as input encoding in Babelfish
where as in TSQL we use UTF16 encoding fir nvarchar irrespective of input encoding.

RCA: we were considering varchar and nvarchar as same, whereas we should use input encoding for varchar and UTF16
encoding for nvarchar.

FIX: So we need to identify that if the input is nvarchar then we will do the UTF16 encoding.

For a casting like nvarchar->varbinary->nvarchar, now since for the casting we are encoding the input string into UTF16
encoding via function nvarcharvarbinary, so while converting varbinary-> nvarchar we will use the function
varbinarynvarchar where we will convert UTF16 encoding to UTF8 with null padding.

So we created a function nvarcharvarbinary and varbinarynvarchar to handle nvarchar<-> varbinary to and fro casting.
And for this casting we have specifically applied a condition that we will not convert the datatype to basetype before choosing the casting function

Task: BABEL-4891

Signed-off-by: Pranav Jain <pranavjc@amazon.com>

148 of 183 new or added lines in 3 files covered. (80.87%)

46822 of 62492 relevant lines covered (74.92%)

167208.03 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
8
80.87
1.27% contrib/babelfishpg_common/src/varbinary.c
27
83.23
-2.73% contrib/babelfishpg_common/src/varchar.c
Jobs
ID Job ID Ran Files Coverage
1 12684333519.1 09 Jan 2025 06:15AM UTC 115
74.92
GitHub Action Run
Source Files on build 12684333519
  • Tree
  • List 115
  • Changed 72
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #12684333519
  • ef9bb371 on github
  • Prev Build on BABEL_5_X_DEV (#12683444717)
  • Next Build on BABEL_5_X_DEV (#12693842151)
  • 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