Skip to content

GH-1523: NullPointerException when executing executeUpdate method and the backend returns -1 - #1524

Merged
jbonofre merged 1 commit into
apache:mainfrom
scruz-denodo:execute_update_zero
Nov 26, 2026
Merged

jbonofre merged 1 commit into
apache:mainfrom
scruz-denodo:execute_update_zero

Conversation

@scruz-denodo

@scruz-denodo scruz-denodo commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What's Changed

Result from the executeUpdate method is checked at org.apache.arrow.driver.jdbc.client.ArrowFlightSqlClientHandler.
The returned value is always greater or equals to zero.

So, in the practice, a negative number of updated records is normalized to zero.

Closes #1523.

…od and the backend returns -1

A server that does not know how many rows an update changed answers -1. Avatica takes that for a statement that
returned a result set, and fails with a NullPointerException because the
signature of an update has no columns. The driver now reports 0.
@scruz-denodo scruz-denodo changed the title GH-1523: NullPointerException when executing executeUpdate method a… GH-1523: NullPointerException when executing executeUpdate method and the backend returns -1 Nov 25, 2026
@scruz-denodo

Copy link
Copy Markdown
Contributor Author

This change is for #1523 issue

@jbonofre jbonofre added the bug-fix PRs that fix a big. label Nov 25, 2026
@apache apache deleted a comment from github-actions Bot Nov 25, 2026
@github-actions github-actions Bot added this to the 20.1.0 milestone Nov 26, 2026

@jbonofre jbonofre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @scruz-denodo!

@jbonofre
jbonofre merged commit f9ce335 into apache:main Nov 26, 2026
22 of 26 checks passed
@scruz-denodo
scruz-denodo deleted the execute_update_zero branch November 26, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PRs that fix a big.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Flight SQL JDBC] NullPointerException when executing executeUpdate method and the backend returns -1

3 participants