apache / apache/arrow-java

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

Abierto
#83 5 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
94
Forks
152
Merge medio
3 d 16 h
PR fusionados (30 d)
11

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza ejecutando el programa de pruebas ZD128958 contra el Arrow Flight SQL JDBC Driver y compara Statement.getUpdateCount() con el conjunto de resultados devuelto para un UPDATE. Rastrea la ruta del controlador JDBC que gestiona los resultados de UPDATE; se considera terminado cuando getUpdateCount() informa del número de filas actualizadas, como hace el controlador de PostgreSQL.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
database
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.