Repository navigation
Fix TIMESTAMP(10..12) fetch performance issue(#1079) and drop Python 3.9/3.10 wheel builds - #1080
Merged
Merged
Conversation
…thon 3.9/3.10 wheel builds Signed-off-by: Earamma K <ek@rocketsoftware.com>
bimalkjha
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix for #1079.
Fetching TIMESTAMP columns with fractional precision greater than 9 (TIMESTAMP(10..12)) raised a CLI0182W (SQLSTATE 01S07) truncation warning for every fetched row. The resulting diagnostic handling introduced significant fetch overhead.
This PR updates timestamp binding to use extended timestamp structures for high-precision timestamps and removes Python 3.9 and 3.10 support.
Changes
ibm_db.c: bind TIMESTAMP columns with scale > 9 using SQL_C_TIMESTAMP_EXT
(TIMESTAMP_STRUCT_EXT) instead of TIMESTAMP_STRUCT. This covers
single-row fetch (SQLBindCol), rowset fetch, and the cleanup paths.
Python values are unchanged:
datetime.datetimewith microsecond precision.ibm_db.c (
ibm_db_fetch_callproc): the debug log messages for array andscalar TIMESTAMP output parameters now show whether the type is TIMESTAMP or
TIMESTAMP WITH TIME ZONE. The two types share a case branch and were both
logged as TIMESTAMP.
.github/workflows/bld_wheels_and_upload.yml: skip cp39/cp310/pp39/pp310 in
all cibuildwheel jobs (Windows, Linux, macOS), so 3.9 and 3.10 wheels are no
longer built.
setup.py: remove the 3.9/3.10 classifiers.
README: Update supported Python version range and add timestamp precision notes.
Tests: add test_6794 and async test_37 for timestamp precision fetch.