You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Ji Liu (JIRA)" <ji...@apache.org> on 2019/07/31 12:44:00 UTC

[jira] [Created] (ARROW-6083) [Java] Refactor Jdbc adapter consume logic

Ji Liu created ARROW-6083:
-----------------------------

             Summary: [Java] Refactor Jdbc adapter consume logic
                 Key: ARROW-6083
                 URL: https://issues.apache.org/jira/browse/ARROW-6083
             Project: Apache Arrow
          Issue Type: Improvement
            Reporter: Ji Liu
            Assignee: Ji Liu


Jdbc adapter read from {{ResultSet}} looks like:

while (rs.next()) {
 for (int i = 1; i <= columnCount; i++) {
 jdbcToFieldVector(
 rs,
 i,
 rs.getMetaData().getColumnType(i),
 rowCount,
 root.getVector(rsmd.getColumnName(i)),
 config);
 }
 rowCount++;
}

And in {{jdbcToFieldVector}} has lots of switch-case, that is to see, for every single value from ResultSet we have to do lots of analyzing conditions.

I think we could optimize this using consumer/delegate like avro adapter.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)