Skip to content

feat: Add CommandPreparedStatementUpdate route to cursor.execute() in the Python ADBC Flight SQL driver#4161

Draft
ennuite wants to merge 4 commits intoapache:mainfrom
ennuite:gh-4074-add-is-update
Draft

feat: Add CommandPreparedStatementUpdate route to cursor.execute() in the Python ADBC Flight SQL driver#4161
ennuite wants to merge 4 commits intoapache:mainfrom
ennuite:gh-4074-add-is-update

Conversation

@ennuite
Copy link
Copy Markdown

@ennuite ennuite commented Mar 31, 2026

AI Disclaimer

This change was created with AI assistance (Augment Code). All lines were manually reviewed by a human. The output is not copyrightable subject matter.

Closes #4074

@ennuite
Copy link
Copy Markdown
Author

ennuite commented Mar 31, 2026

I'm unsure of which component to use given that I touched 3 different ones: ‎go/adbc/driver/flightsql, ‎python/adbc_driver_flightsql and ‎python/adbc_driver_manager

It's my first PR in this codebase and I'm not very familiar with Go. I would appreciate a review not only on the content but also on style. I'm available for improving this as requested.

It's not yet in a state where I feel like it's ready to merge, although it is fine as a PoC.

Things I want to improve:

  1. Add some tests for the Python driver.
  2. Change the way I'm fetching the option. Details: it is being fetched in a code path that is shared by all drivers and not just by the Flight driver, and in those cases it will always throw an exception (which is caught with no side effects). This might hinder performance, and I'm not a proponent of using exceptions for control flow. I intend to move the logic to a code path specific to the Flight SQL driver and remove the exceptions.

Question: I added a logger in Python, but I don't see logging being used anywhere else. I would like to know your opinion on log statements in this codebase.

@ennuite ennuite changed the title feat: Add new network route via cursor.execute() feat: Add CommandPreparedStatementUpdate route to cursor.execute() in the Python ADBC Flight SQL driver Mar 31, 2026
@ennuite
Copy link
Copy Markdown
Author

ennuite commented Mar 31, 2026

This PR is not an individual piece of work. It requires changes in Arrow-Go and the main repo.

Copy link
Copy Markdown
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

Don't make any Python changes. It should be handled entirely in the driver.

@ennuite
Copy link
Copy Markdown
Author

ennuite commented Apr 1, 2026

Don't make any Python changes. It should be handled entirely in the driver.

@lidavidm I thought about that and it would definitely be much easier. However, do we want this in ADBC Go? My understanding is that, in ADBC Go, queries that generate result sets go via Statement.executeQuery() and queries that don't go via Statement.executeUpdate(). Do we want DML queries in Statement.executeQuery()?

@lidavidm
Copy link
Copy Markdown
Member

lidavidm commented Apr 1, 2026

Yes, that should be handled properly. It'll simply return an empty resultset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants