apache / drill

Apache Drill is a distributed MPP query layer for self describing data
https://drill.apache.org/
Apache License 2.0
1.93k stars 984 forks source link

JDBC execute more than one sqls in same connection ,drill report exception msg in drill.log with info level #2830

Closed yaozhu closed 10 months ago

yaozhu commented 10 months ago

Before submitting a bug report, please verify that you are using the most current version of Drill.

Drill jdbc execute more than one sqls in same connection ,drill report exception msg in drill.log with info level

reproduce stop follow this: //mysql datasource //create table t1 (a int, b varchar(100), c varchar(100)) //insert into t1 values( 1, 'aaa','bbbb'); String sql = "select * from t1 limit 1"; try { Statement stmt = conn.createStatement(); for (int i = 0 ; i < 4 ; ++i) { stmt.executeQuery(sql); } System.out.println("DONE!");

} catch (SQLException e) { e.printStackTrace(); }finally { conn.close(); }

image

cgivre commented 10 months ago

@yaozhu This is a documented behavior of Drill. You are welcome to submit a PR to modify Drill to allow multiple queries in the JDBC driver.

jnturton commented 10 months ago

You can run as many queries as you like on a single connection (sequentially) but please complete the execution of each query by scrolling through its ResultSet cursor before starting another one.