Fix incorrect getColumnClassName

Original commit: elastic/x-pack-elasticsearch@a11bfd477f
This commit is contained in:
Costin Leau 2017-10-05 14:12:10 +03:00
parent e1a7c59d15
commit 00405ddace
1 changed files with 3 additions and 3 deletions

View File

@ -5,13 +5,13 @@
*/
package org.elasticsearch.xpack.sql.jdbc.jdbc;
import org.elasticsearch.xpack.sql.jdbc.net.protocol.ColumnInfo;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.List;
import java.util.Locale;
import org.elasticsearch.xpack.sql.jdbc.net.protocol.ColumnInfo;
import static java.lang.String.format;
class JdbcResultSetMetaData implements ResultSetMetaData, JdbcWrapper {
@ -137,7 +137,7 @@ class JdbcResultSetMetaData implements ResultSetMetaData, JdbcWrapper {
@Override
public String getColumnClassName(int column) throws SQLException {
return column(column).type.getName(); // NOCOMMIT this is almost certainly wrong.
return JdbcUtils.classOf(column(column).type.getVendorTypeNumber()).getName();
}
private void checkOpen() throws SQLException {