apache / apache/arrow-java

[Java] Arrow-to-JDBC

オープン
#363 コメント 19 件 リアクション 0 件 担当者 1 名 @wgtmac が担当を希望しています GitHub で見る
Type: enhancement
主要言語
Java
スター
94
フォーク
152
平均マージ
3日 16時間
マージ済み PR(30日)
11

説明

ARROW-1780 reads a query from a JDBC data source and converts the ResultSet to an Arrow VectorSchemaRoot.  However, there is no built-in adapter for writing an Arrow VectorSchemaRoot back to the database.

ARROW-3966 adds JDBC field metadata:
- The Catalog Name
- The Table Name
- The Field Name
- The Field Type

We can use this information to ask for the field information from the database via the [DatabaseMetaData](https://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html) object.  We can then create INSERT or UPDATE statements based on the [list of primary keys](https://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getPrimaryKeys(java.lang.String,%20java.lang.String,%20java.lang.String)) in the table:
- If the value in the VectorSchemaRoot corresponding to the primary key is NULL, insert that record into the database.
- If the value in the VectorSchemaRoot corresponding to the primary key is not NULL, update the existing record in the database.

We can also perform the same data conversion in reverse based on the field types queried from the database.

**Reporter**: [Michael Pigott](https://issues.apache.org/jira/browse/ARROW-4144) / @mikepigott

**Note**: *This issue was originally created as [ARROW-4144](https://issues.apache.org/jira/browse/ARROW-4144). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。