Does hive jdbc support java.sql.PreparedStatement?
I am trying to query a hive using java.sql.PreparedStatemen
t and get an empty result set. The same query gives the correct set of results when executed with java.sql.Statement
. I am using hive jdbc 1.2.2 jar and the hive servers are on the Hortonworks hdp stack.
Yes it does:
public class
HivePreparedStatement
extends HiveStatement implementsjava.sql.PreparedStatement
As you can see, Hive implements the JDBC interface internally PreparedStatement
, and thus the driver supports this JDBC functionality.
For reference see: https://hive.apache.org/javadocs/r1.2.2/api/org/apache/hive/jdbc/HivePreparedStatement.html
Hope it helps.