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

babelfish-for-postgresql / babelfish_extensions / 15711252052
77%

Build:
DEFAULT BRANCH: BABEL_5_X_DEV
Ran 17 Jun 2025 03:51PM UTC
Jobs 1
Files 119
Run time 11min
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

17 Jun 2025 03:16PM UTC coverage: 75.557% (-0.002%) from 75.559%
15711252052

push

github

web-flow
Do not coerce float/real datatypes in pre_transform_hook (#3840)

ISSUE: When lower precedence datatypes (to real/float) are grouped on one side and then union'ed with real or float datatypes then "not equal" values were being grouped together. This was found during real and float testing when "not equal" real values were being grouped together and the root cause helped us extrapolate issues with numeric/int/smallint/tinyint as well.
NOTE: In Fact, for Numeric unioned REAL/FLOAT we were also observing crashes due to the early coercion and precision mismatch during aggregation.

Root Cause: The coerce_to_target_type during pre_transform_hook is applying the implicit cast too early -- even before grouping.
When the REAL(or other lower precedence type) values are cast to FLOAT(Or Higher precedence types) during the coercion, there might be precision differences. The cast types in PG from lower to high precedence types are defined as "IMPLICIT" which gives the freedom to optimizer to evaluate on the go. In case of "ASSIGNED" cast types optimizer would have grouped first and then applied cast -- it prevents the automatic type conversion during the grouping phase -- which would be the expected outcome.

Solution: Prevent the cast from happening too early for REAL/FLOAT, thus, maintaining the original precision for grouping and only cast for the final result.

Issues Resolved:
BABEL-5798

Signed-off-by: kushaal shroff <kushaal@amazon.com>

3 of 3 new or added lines in 1 file covered. (100.0%)

2 existing lines in 1 file now uncovered.

48877 of 64689 relevant lines covered (75.56%)

317038.07 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
76.03
-0.63% contrib/babelfishpg_tds/src/backend/tds/tdscomm.c
Jobs
ID Job ID Ran Files Coverage
1 15711252052.1 17 Jun 2025 03:51PM UTC 119
75.56
GitHub Action Run
Source Files on build 15711252052
  • Tree
  • List 119
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #15711252052
  • 99ecebb4 on github
  • Prev Build on BABEL_5_X_DEV (#15703099726)
  • Next Build on BABEL_5_X_DEV (#15712476676)
  • 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