Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does hive jdbc support java.sql.PreparedStatement?

Tags:

jdbc

hive

I am trying to query hive using java.sql.PreparedStatement and getting an empty result set, Same query giving proper resultset when executed using java.sql.Statement. I am using hive jdbc 1.2.2 jar and hives server is in Hortonworks hdp stack.

like image 689
ab_ Avatar asked Feb 14 '26 19:02

ab_


1 Answers

Yes, it does:

public class HivePreparedStatement extends HiveStatement implements java.sql.PreparedStatement

As can be seen, internally Hive does implement the JDBC interface PreparedStatement and thus, the driver supports this JDBC feature.

For reference see: https://hive.apache.org/javadocs/r1.2.2/api/org/apache/hive/jdbc/HivePreparedStatement.html

Hope it helps.

like image 135
MWiesner Avatar answered Feb 19 '26 06:02

MWiesner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!