Orginal problem in #964.
In order to support custom types not handled correctly by SQLite type affinity, custom type mapping possibility was added in #1741.
However that might not be enough. Now we only support type definitions based on sqlTypeName. However, this may not be the single determining factor.
So it seems that there are a lot of edge cases of determining the JDBC type in SQLite, and several column type determination mechanisms can be particularly relevant for it:
- column name -> type (like
colTypes: Map<String, ColType> in CSV IO)
- may be column metadata (not only
sqlTypeName) -> type
- inferring from values?
It's also important not only for custom types, but for simple INTEGER nullable columns .
Xerial SQLite JDBC driver seems to give identical metadata for them, however actually types of values can be both Int? and Long? (looks like a separate issue perhaps).
TableColumnMetadata(name='int_col', sqlTypeName='INTEGER', jdbcType=4, size=2147483647, javaClassName='java.lang.Object', isNullable=true)
TableColumnMetadata(name='long_col', sqlTypeName='INTEGER', jdbcType=4, size=2147483647, javaClassName='java.lang.Object', isNullable=true)
Need to investigate different usecases and and practices and improve handling of SQLite types.
Orginal problem in #964.
In order to support custom types not handled correctly by SQLite type affinity, custom type mapping possibility was added in #1741.
However that might not be enough. Now we only support type definitions based on
sqlTypeName. However, this may not be the single determining factor.So it seems that there are a lot of edge cases of determining the JDBC type in SQLite, and several column type determination mechanisms can be particularly relevant for it:
colTypes: Map<String, ColType>in CSV IO)sqlTypeName) -> typeIt's also important not only for custom types, but for simple
INTEGERnullable columns .Xerial SQLite JDBC driver seems to give identical metadata for them, however actually types of values can be both
Int?andLong?(looks like a separate issue perhaps).Need to investigate different usecases and and practices and improve handling of SQLite types.