Reply
New Contributor
Posts: 1
Registered: ‎07-25-2018

PreparedStatement through Cloudera Impala JDBC driver

When trying to execute PreparedStatement, the type of the column on the WHERE is always treated as a VARCHAR in the Impala driver no matter what is the original type on source.

 

Class.forName("com.cloudera.impala.jdbc4.Driver");
con = DriverManager.getConnection(connectionUrl);
String sql = "select * from default.employee where id= ?";
PreparedStatement pstm = con.prepareStatement(sql);

While looking inside getParameterMetaData()  the type is always VARCHAR. 

Is there any way to get the original column type from source?

Announcements