Skip to content

fix: custom query row validation on Db2 loses precision and scale#1709

Open
anzzyspeaksgit wants to merge 1 commit intoGoogleCloudPlatform:developfrom
anzzyspeaksgit:fix/issue-1706
Open

fix: custom query row validation on Db2 loses precision and scale#1709
anzzyspeaksgit wants to merge 1 commit intoGoogleCloudPlatform:developfrom
anzzyspeaksgit:fix/issue-1706

Conversation

@anzzyspeaksgit
Copy link

Summary

Fixes an issue where custom query row validation on Db2 loses decimal precision and scale because it was ignoring cursor.description values.

Problem

Closes #1706

Solution

Updated _get_type() to receive the entire column tuple from cursor.description rather than just the type string, and extracted precision and scale (at indexes 4 and 5 respectively) when returning an Ibis Decimal data type. This mimics how PostgreSQL and Oracle extract type sizes.

Testing

  • Code updated
  • Lint passed

This PR was created with AI assistance.

@google-cla
Copy link

google-cla bot commented Mar 22, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom query row validation on Db2 loses precision and scale

1 participant