DataFrame.Companion.fromResultSet() supports PostgeSQL column types
devkenyiu opened this issue · 1 comments
devkenyiu commented
In Builder.kt (ln 255), the column types are determined by rs.metaData.getColumnTypeName()
.
When I used it with PostgreSQL (v9), the column type names returned by the JDBC driver are different from those in the method (at least, they are all in lowercase, not in uppercase). Therefore, I wrote my own method in Java (for my Java project).
I suggest, instead of using getColumnTypeName()
, it may be easier to use getColumnType()
(which returns the int code defined in java.sql.Types
) to implement the method, because different db vendors may use different names for the same type.
holgerbrandl commented
Thanks for the suggestion.