fix: coerce tz-aware datetimes to naive for timezone=False columns#2
Merged
Conversation
rad-pat
reviewed
Jun 18, 2026
rad-pat
left a comment
Member
There was a problem hiding this comment.
The nightly is there so that tests always run against the latest Databend somthat failures are found early
Member
Author
|
@rad-pat Thanks. just seeing CI errors on a related PR, so wasn't sure what to do. Should I close this? |
Member
Author
Newer Databend drivers return tz-aware (UTC) datetimes. A plain DateTime()/TIMESTAMP column (timezone=False) must yield naive values to honour SQLAlchemy's typing contract, which is what the compliance suite's naive datetime/timestamp/interval round-trips assert. Normalise to UTC and drop tzinfo in DatabendDateTime.result_processor for timezone=False columns; timezone=True columns stay aware. Adds a server-less unit test covering aware/naive/None/string inputs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
f56e4fe to
ab56a51
Compare
Member
Author
|
@rad-pat Dropped the pin. |
Member
|
Just FYI, if we wanna use these going forward then they need to be opened to databend/databend-sqlalchemy |
Member
Author
|
@rad-pat FYI - thanks for the FYI :) |
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.
Fixes the datetime/timestamp/interval compliance-suite failures (tz-aware UTC vs naive) by stripping tzinfo for
timezone=Falsecolumns inDatabendDateTime.result_processor.timezone=Truecolumns stay aware. Adds a server-less unit test covering aware/naive/None/string inputs.The CI image pin has been dropped — the floating
:nightlytag is the only channel Databend publishes (there is no stable non-nightly tag), and keeping it preserves @rad-pat's early-warning on upstream drift. The dialect fix is what makes the suite green against nightly, not a frozen server. If upstream drift starts gating unrelated PRs, we can add a pinned job + scheduled:nightlycanary in a focused follow-up.🤖 Generated with Claude Code