Skip to content

Commit

Permalink
Documentation for public static VectorSchemaRoot sqlToArrow(Connectio…
Browse files Browse the repository at this point in the history
…n connection, String query, JdbcToArrowConfig config)
  • Loading branch information
Mike Pigott committed Dec 8, 2018
1 parent 4f1260c commit 8d6cf00
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,18 @@ public static VectorSchemaRoot sqlToArrow(
return sqlToArrow(connection, query, new JdbcToArrowConfig(allocator, calendar));
}

/**
* For the given SQL query, execute and fetch the data from Relational DB and convert it to Arrow objects.
*
* @param connection Database connection to be used. This method will not close the passed connection object.
* Since the caller has passed the connection object it's the responsibility of the caller
* to close or return the connection to the pool.
* @param query The DB Query to fetch the data.
* @param config Configuration
* @return Arrow Data Objects {@link VectorSchemaRoot}
* @throws SQLException Propagate any SQL Exceptions to the caller after closing any resources opened such as
* ResultSet and Statement objects.
*/
public static VectorSchemaRoot sqlToArrow(Connection connection, String query, JdbcToArrowConfig config)
throws SQLException, IOException {
Preconditions.checkNotNull(connection, "JDBC connection object can not be null");
Expand Down

0 comments on commit 8d6cf00

Please sign in to comment.