kujon opened a new pull request #29192:
URL: https://github.com/apache/spark/pull/29192


   ### What changes were proposed in this pull request?
   This PR fixes the support for char(n)[], character(n)[] data types. Prior to 
this change, a user would get `Unsupported type ARRAY` exception when 
attempting to interact with the table with such types.
   
   The description is a bit more detailed in the JIRA itself, but the crux of 
the issue is that postgres driver names char and character types as `bpchar`. 
The relevant driver code can be found 
[here](https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java#L85-L87).
 `char` is very likely to be still needed, as it seems that pg makes a 
distinction between `char(1)` and `char(n > 1)` as per [this 
code](https://github.com/pgjdbc/pgjdbc/blob/b7fd9f3cef734b4c219e2f6bc6c19acf68b2990b/pgjdbc/src/main/java/org/postgresql/core/Oid.java#L64).
   
   
   ### Why are the changes needed?
   For completeness of the pg dialect support.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Unit tests
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to