Repository navigation
Conversation
Fixes ClickHouse#3387. Signed-off-by: 7487 <1042653432@qq.com>
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 scalar
LocalDateTimeandLocalTimequery parameters by using the existing ClickHouse temporal formatters that always emit seconds. This prevents zero-secondDateTimevalues from being rejected and zero-secondTimevalues from being interpreted as minutes and seconds, while preserving non-zero fractional seconds.Closes #3387.
Testing
DateTime,DateTime64,Time, andTime64.client-v2unit and integration suites against ClickHouse 26.8.git diff --check.Checklist
Note
Low Risk
Targeted change to scalar query-parameter formatting for two Java temporal types, with tests and docs; no auth or core transport changes.
Overview
Scalar
LocalDateTimeandLocalTimevalues passed as named query parameters are now serialized through the existingDataTypeUtilsnanosecond-aware formatters inconvertParameterToString, instead ofString.valueOf. That always emits the seconds field and keeps non-zero fractional digits, aligning with ClickHouseDateTime/DateTime64andTime/Time64text forms.This fixes
DateTimeparams with zero seconds that failed server parsing andTimevalues that were wrongly interpreted as hours/minutes only (e.g.09:00vs09:00:00). Unit and integration round-trip tests plusdocs/features.mdand changelog note the contract.Reviewed by Cursor Bugbot for commit e4f4849. Bugbot is set up for automated code reviews on this repo. Configure here.