Skip to content

Commit 8d6cf00

Browse files
author
Mike Pigott
committed
Documentation for public static VectorSchemaRoot sqlToArrow(Connection connection, String query, JdbcToArrowConfig config)
1 parent 4f1260c commit 8d6cf00

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/JdbcToArrow.java

+12
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,18 @@ public static VectorSchemaRoot sqlToArrow(
120120
return sqlToArrow(connection, query, new JdbcToArrowConfig(allocator, calendar));
121121
}
122122

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

0 commit comments

Comments
 (0)