Closed dai-chen closed 4 years ago
This seems a bug because ResultSetMetaDataImpl.getColumnType()
returns JDBC type: https://github.com/opendistro-for-elasticsearch/sql-jdbc/blob/625614647c5110daa4e524143d55ecabb8e50794/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/ResultSetMetaDataImpl.java#L127
But getColumnTypeName()
returns Elastissearch type name: https://github.com/opendistro-for-elasticsearch/sql-jdbc/blob/625614647c5110daa4e524143d55ecabb8e50794/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/ResultSetMetaDataImpl.java#L133
For some reason, JDBC driver returns
KEYWORD
type rather than standardVARCHAR
orNVARCHAR
. I checked that there is no keyword type in the spec: https://docs.oracle.com/javase/8/docs/api/java/sql/Types.html. I don't remember if we do this on purpose or not.