hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chen keven <cke...@gmail.com>
Subject Does hive support preparedstatement?
Date Mon, 20 Jul 2009 18:46:04 GMT
 I'm trying to use preparestament as following, however, I got the
SQLException saying that the setInt method is not supported. Is there any
special requirements to use prepareStatement in hive? where can i find the
user manual for the api.


                statement = _conn.prepareStatement(expression);
                //Set parameters
                for (Integer fieldindex : parameters.keySet() ) {

                    statement.setInt(fieldindex,
Integer.parseInt(parameters.get(fieldindex)));
                }

                statement.executeQuery();

java.sql.SQLException: Method not supported
    at
org.apache.hadoop.hive.jdbc.HivePreparedStatement.setInt(HivePreparedStatement.java:349)
    at
ca.ubc.ece.netsys.db.HiveDatabaseLayer.executeUpdateWithParameter(HiveDatabaseLayer.java:292)
    at
ca.ece.ubc.netsys.graph.EdgeCreator.populateEdgeTable(EdgeCreator.java:109)
    at ca.ece.ubc.netsys.graph.EdgeCreator.run(EdgeCreator.java:49)
    at java.lang.Thread.run(Thread.java:619)


-- 
Thank you,
Keven Chen

Mime
View raw message