-
Notifications
You must be signed in to change notification settings - Fork 622
Fix ClickHouseColumn: resolve Fixed/UTC±HH:MM:SS timezone names to correct offset #2877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
polyglotAI-bot
wants to merge
3
commits into
main
Choose a base branch
from
polyglot/fix-fixed-utc-timezone-resolution
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+109
−6
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
3df3317
Fix ClickHouseColumn: resolve Fixed/UTC±HH:MM:SS timezone names to co…
polyglotAI-bot d6be12f
Add tests for Fixed/UTC fallback and DateTime(scale, tz) timezone res…
polyglotAI-bot 7d48053
Clarify resolveTimeZone null contract and drop unused test import
polyglotAI-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks — addressed the documentation part in 7d48053 by taking your "update the Javadoc" option:
tzNameis now documented as non-null and the return is qualified as "never null for a non-nulltzName".I verified the underlying claim empirically (JDK 17):
TimeZone.getTimeZone((String) null)does throwNullPointerException. However, I deliberately did not add a runtime null guard, because:column.parameters.get(i).replace("'", "").String.replacereturns non-null, and a null list element would already NPE at.replace(...)beforeresolveTimeZoneis entered — so the method is never invoked withnull.TimeZone.getTimeZone(parameters.get(i).replace("'", ""))directly and had identical null behavior; this PR only inserts theFixed/UTCbranch ahead of that same delegating call.null→default guard would change behavior on an unreachable path and risks masking a genuine upstream parsing bug, whichdocs/changes_checklist.md→ "Null handling changed" cautions against ("New null checks do not hide genuine bugs").So the clarified Javadoc makes the existing non-null contract explicit without altering behavior. Happy to add
Objects.requireNonNull(tzName)instead if maintainers would prefer an explicit precondition check.