apache / apache/arrow-java

[Java][FlightSQL] Arrow Flight SQL JDBC Driver returns -1 for getUpdateCount()

オープン
#83 コメント 5 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
94
フォーク
152
平均マージ
3日 16時間
マージ済み PR(30日)
11

説明

### Describe the bug, including details regarding any error messages, version, and platform.

Tested on Arrow Flight JDBC 15, 15.02 and with a locally-built Arrow Flight SQL JDBC Driver 17.0.0-SNAPSHOT.

When using a JDBC statement to execute an UPDATE, the getUpdateCount() method seems to always return -1. This seems to be incorrect. The getUpdateCount() should return the number of rows UPDATEd.

For a data source, we're using the [Voltron docker container](https://hub.docker.com/r/voltrondata/flight-sql)

In this debugger image, you can see the return counts from the getUpdateCount() and from the actual result set (the update returns one row, with one column, that indicates the number of UPDATEd rows.

Screenshot 2024-05-20 at 14 10 23

Here is a screen grab of the output data:
Screenshot 2024-05-20 at 14 11 39

And, in this screengrab, I used the Postgres driver to update a table in postgres:latest Docker image:
Screenshot 2024-05-07 at 17 30 55

The data in the Postgres table is different, but the getUpdateCount() method returned 1 which is correct for that data.
The test program I used is checked into this Github repo: [ZD128958](https://github.com/rcprcp/ZD128958)

Thank you!

### Component(s)

Java

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

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

調査の方向性

まず、Arrow Flight SQL JDBC Driver に対して ZD128958 テストプログラムを実行し、UPDATE に対して返される結果セットと Statement.getUpdateCount() を比較します。UPDATE の結果を処理する JDBC ドライバーの経路を追跡します。getUpdateCount() が PostgreSQL ドライバーと同様に更新された行数を報告すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
database
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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