apache / apache/arrow-java

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

Đang mở
#83 5 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
94
Fork
152
Merge trung bình
3 ngày 16 giờ
Pull request đã merge (30 ngày)
11

Mô tả

### 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách chạy chương trình kiểm thử ZD128958 với Arrow Flight SQL JDBC Driver và so sánh Statement.getUpdateCount() với tập kết quả được trả về cho một UPDATE. Theo dõi đường đi trong JDBC driver xử lý các kết quả UPDATE; hoàn tất khi getUpdateCount() báo cáo số hàng đã được cập nhật, giống như PostgreSQL driver.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
database
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.