Skip to content

DX-105241: Support Flight SQL batch updates - #1410

Draft
mykolapavlov-dremio wants to merge 1 commit into
apache:mainfrom
mykolapavlov-dremio:DX-105241
Draft

mykolapavlov-dremio wants to merge 1 commit into
apache:mainfrom
mykolapavlov-dremio:DX-105241

Conversation

@mykolapavlov-dremio

Copy link
Copy Markdown

Summary

Fix Arrow Flight SQL JDBC prepared-statement batch handling for servers that emit one update result per parameter row.

The client now collects all update counts, exposes one count per batch entry, translates partial failures to BatchUpdateException, and releases response buffers on success and failure.

Changes

  • Add executeUpdateBatch() to the Flight SQL prepared-statement client.
  • Drain and close every PutResult.
  • Make SyncPutListener safe against late callbacks during cleanup.
  • Preserve counts received before a Flight failure.
  • Translate batch failures to JDBC BatchUpdateException.
  • Update JDBC batch tests and the mock producer for multiple results.

Test plan

  • Verify a ten-row batch returns ten update counts.
  • Verify a late server failure returns BatchUpdateException with partial counts.
  • Verify connection close reports no Arrow allocator leak.

Related

Collect all prepared-statement update results and translate partial batch failures to BatchUpdateException. Close response buffers on success and failure to prevent allocator leaks.
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.

1 participant