emkornfield commented on a change in pull request #10912:
URL: https://github.com/apache/arrow/pull/10912#discussion_r690016023
##########
File path:
java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/AbstractJdbcToArrowTest.java
##########
@@ -140,4 +146,160 @@ public void destroy() throws SQLException {
*/
public abstract void testDataSets(VectorSchemaRoot root);
+ /**
+ * For the given SQL query, execute and fetch the data from Relational DB
and convert it to Arrow objects.
+ * This method uses the default Calendar instance with default TimeZone and
Locale as returned by the JVM.
+ * If you wish to use specific TimeZone or Locale for any Date, Time and
Timestamp datasets, you may want use
+ * overloaded API that taken Calendar object instance.
+ *
+ * @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 allocator Memory allocator
+ * @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, BufferAllocator allocator)
Review comment:
It seems ashame to simply do a code move here, would it make sense to
make the deprecated methods package private instead and commnent that they are
test only?
I think this also reminds me that the model for the iteration here doesn't
match the Loader/Unloader pattern but creates a new VectorSchemaRoot each time
(I might be misremembering though)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]