Repository navigation
fix(oracle): map ISO week-numbering year IYYY to %G [CLAUDE] - #8675
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Oracle's
TIME_MAPPINGalready mapsIW(ISO 8601 week) to%V, but notIYYY(the ISO 8601 week-numbering year), so%Gcoming from another dialect is emitted into Oracle'sTO_CHARas a literal:Oracle documents
IYYYas the "4-digit year of the year containing the calendar week, as defined by the ISO 8601 standard" (https://docs.oracle.com/en/database/oracle/oracle-database/23/sqlrf/Format-Models.html), which is what%Gmeans. Per the same table,IWandIYYYare valid inTO_CHARbut not in theTO_*conversion functions, so the new tests only cover theTO_CHARdirection. This is the Oracle counterpart of #8672 (Postgres, merged).Tests: two
validate_allcases intests/dialects/test_oracle.py(DuckDB and BigQuery into Oracle). Both fail onmainand pass with this change; the full unittest suite (1477 tests) andpre-commit run --all-files(ruff, ruff-format, mypy) pass locally.Developed with Claude Code (AI) on my behalf.
🤖 Generated with Claude Code