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

babelfish-for-postgresql / babelfish_extensions / 9416708039
76%
BABEL_5_X_DEV: 77%

Build:
Build:
LAST BUILD BRANCH: babel_6032
DEFAULT BRANCH: BABEL_5_X_DEV
Ran 07 Jun 2024 01:00PM UTC
Jobs 1
Files 114
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

07 Jun 2024 12:08PM UTC coverage: 73.062% (+0.2%) from 72.901%
9416708039

push

github

web-flow
Fix issues while CASTing string literal to datetime, datetime2 and datetimeoffset (#2621)

This PR addresses the behavioural differences in CASTing of string literals to datetime, datetime2 and datetimeoffset. The following changes have been made to fix the issue :

Currently, we use native PG function named ParseDateTime for parsing the input string literals. This function does not handle some cases such as empty spaces between the fields. We have created a function named cleanup_input_str which will modify the input string to remove all the unnecessary spaces and then call the inbuilt ParseDateTime function.
ParseDatetime splits the input string to different fields which then will be decoded in native function namedDecodeDateTime. But DecodeDatetime will not handle some cases such as accepting : as a separator for seconds and milliseconds. These additional cases were handled in a different function named tsql_decode_datetime_fields .
Also, if there is a text month we check the REGEX of the input str so that it matches the T-SQL behaviour

Issues Resolved: BABEL-4328

Signed-off-by: Sai Rohan Basa bsrohan@amazon.com

376 of 383 new or added lines in 3 files covered. (98.17%)

3 existing lines in 1 file now uncovered.

42284 of 57874 relevant lines covered (73.06%)

109596.7 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
86.89
9.49% contrib/babelfishpg_common/src/datetime2.c
5
92.58
1.34% contrib/babelfishpg_common/src/datetime.c

Uncovered Existing Lines

Lines Coverage ∆ File
3
92.58
1.34% contrib/babelfishpg_common/src/datetime.c
Jobs
ID Job ID Ran Files Coverage
1 9416708039.1 07 Jun 2024 01:00PM UTC 114
73.06
GitHub Action Run
Source Files on build 9416708039
  • Tree
  • List 114
  • Changed 73
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #9416708039
  • 67288fcc on github
  • Prev Build on BABEL_4_X_DEV (#9402642045)
  • Next Build on BABEL_4_X_DEV (#9451272229)
  • 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