Skip to content

GH-49497: [FlightRPC] Add is_update field to ActionCreatePreparedStatementResult#49498

Merged
lidavidm merged 1 commit into
apache:mainfrom
ennuite:add-is-update-field
Jun 9, 2026
Merged

GH-49497: [FlightRPC] Add is_update field to ActionCreatePreparedStatementResult#49498
lidavidm merged 1 commit into
apache:mainfrom
ennuite:add-is-update-field

Conversation

@ennuite

@ennuite ennuite commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

Multiple database driver APIs have functions that allow for executing prepared statements that can be either result set generating queries or update commands. Before this PR, there was no way for servers to indicate whether the query should be executed with CommandPreparedStatementUpdate or CommandPreparedStatementQuery.

What changes are included in this PR?

The change in this PR introduces a new field set by the server after creation of the prepared statement to indicate the proper network flow.

Are these changes tested?

No, because these changes are best tested using a database driver but this PR includes only changes to the proto definition.

Are there any user-facing changes?

No.

@github-actions github-actions Bot added the awaiting review Awaiting review label Mar 11, 2026
prmoore77 added a commit to gizmodata/gizmosql-jdbc-driver that referenced this pull request Apr 24, 2026
### Added
- `DatabaseMetaData.getIndexInfo()` now returns real index rows (DuckDB
  backend), via the server's new `_gizmosql_system.main.gizmosql_index_info`
  catalog view (GizmoSQL v1.22.0) with inline-`duckdb_indexes()` fallback
  for older servers and a clear "SQLite backend not supported" error
  otherwise.
- New non-standard `ArrowFlightConnection.getViewDefinition(cat, schema, v)`
  method for retrieving CREATE VIEW DDL text (same three-tier fallback).
- `Statement.execute()` now reports a valid `getUpdateCount()` for
  INSERT/UPDATE/DELETE/DDL: `ArrowFlightMetaImpl.prepareAndExecute` sniffs
  the leading SQL keyword (with comment stripping) and routes DML through
  `DoPutCommandStatementUpdate`. Keyword set kept in sync with the ADBC
  Python driver. A TODO in source points at apache/arrow#49498 to adopt
  the authoritative `is_update` protocol field once it lands upstream.

### Tests
- New unit tests in `ArrowFlightMetaImplTest` for the keyword heuristic.
- New integration tests in `GizmoSqlIntegrationIT` for decimal round-trip,
  `getIndexInfo`, `getViewDefinition`, and DML update counts.
- Upstream `ArrowDatabaseMetadataTest#testGetIndexInfo` (which asserted
  stock empty-result behavior) renamed to
  `testGetIndexInfoAgainstNonGizmosqlServerThrows` to match the new
  contract (driver now throws on non-GizmoSQL Flight SQL servers).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ennuite ennuite marked this pull request as ready for review June 8, 2026 14:20
@ennuite

ennuite commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Now that the vote was approved, I moved this PR to ready for review.

@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Jun 9, 2026
@lidavidm lidavidm merged commit 2cd5ad2 into apache:main Jun 9, 2026
5 of 6 checks passed
@lidavidm lidavidm removed the awaiting merge Awaiting merge label Jun 9, 2026
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 2cd5ad2.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants