Repository navigation
[#13159] fix(postgresql): Preserve CHAR array element lengths - #13162
Open
laserninja wants to merge 2 commits into
Open
laserninja wants to merge 2 commits into
laserninja wants to merge 2 commits into
Conversation
Code Coverage Report
Files
|
Contributor
|
Can you take time resolving the comments? |
Collaborator
Author
|
I resolved the conflicts. Thanks! |
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.
What changes were proposed in this pull request?
Pass JDBC column length into the bpchar element conversion for PostgreSQL arrays. Add converter and catalog integration regression tests for CHAR(5)[].
Why are the changes needed?
Loading a table containing CHAR(n)[] currently throws NullPointerException because array conversion discards the length required by FixedCharType.
Fixes #13159
Does this PR introduce any user-facing change?
PostgreSQL CHAR(n)[] columns load as lists of CHAR(n) with nullable elements. No public API or configuration changes.
How was this patch tested?
JAVA_HOME=<JDK17> ./gradlew :catalogs:catalog-jdbc-postgresql:spotlessApply :catalogs:catalog-jdbc-postgresql:build -PskipITs --max-workers=2passed (47 tests). The new converter test failed before the fix. Against a live PostgreSQL 18 database, catalog table operations returned exactly list<char(5)> and preserved the decimal(10,2) control. The new catalog integration test compiled; the full Docker integration suite was not run.