Hi all,

I am trying to use Drill programmatically in Java through the JDBC driver.
However, when I try to execute the query, the application hangs and never
returns the ResultSet. When I execute the exact same query in sqlline,
everything executes fine.

The code snippet is below and should work with no configuration in
/tmp/drill.

public class DrillJDBCTestTrial {
    public static void main(String[] args) throws SQLException,
ClassNotFoundException {
        Class.forName("org.apache.drill.jdbc.Driver");
        Connection connection =
DriverManager.getConnection("jdbc:drill:zk=local");
        String query = "select N_NAME from
dfs.`/home/meatcar/dev/drill/apache-drill-0.7.0/sample-data/nation.parquet`";

        PreparedStatement statement = connection.prepareStatement(query);

        // hangs here
        ResultSet rs = statement.executeQuery();
    }
}

Any help is appreciated.


Thanks,

-- 
Denys Pavlov

Reply via email to