apache / apache/arrow-java

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

未關閉
#83 5 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Java
星號
94
分支
152
平均合併
3 天 16 小時
30 天內合併 PR
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()。追蹤 JDBC 驅動程式處理 UPDATE 結果的路徑;當 getUpdateCount() 如同 PostgreSQL 驅動程式一樣回報已更新的資料列數量時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
database
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。