forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-47684][SQL] Postgres: Map length unspecified bpchar to StringType
### What changes were proposed in this pull request? This PR maps length unspecified bpchar to StringType for Postgres. Length unspecified bpchar represents variable unlimited character string, and the PG JDBC reports its size with Int.MaxValue. W/o this patch, we will always do char padding to 2147483647. This is inefficient and risky. ### Why are the changes needed? suitable type mapping ### Does this PR introduce _any_ user-facing change? yes, length unspecified bpchar is mapped to StringType, before, CharType(2147483647) ### How was this patch tested? new tests ### Was this patch authored or co-authored using generative AI tooling? no Closes apache#45810 from yaooqinn/SPARK-47684. Authored-by: Kent Yao <[email protected]> Signed-off-by: Kent Yao <[email protected]>
- Loading branch information
Showing
2 changed files
with
15 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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 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