Skip to content

feat(flightsql): allow configuring the driver memory allocator - #1076

Open
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:feat/flightsql-driver-allocator
Open

feat(flightsql): allow configuring the driver memory allocator#1076
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:feat/flightsql-driver-allocator

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #59

Problem

The FlightSQL database driver always used memory.DefaultAllocator when building prepared-statement parameter records. Applications configuring the driver programmatically could not route these allocations through a checked, pooled, or otherwise custom allocator.

Change

Add an optional Allocator field to DriverConfig. Connector.Configure installs it on the FlightSQL client, and prepared-statement parameter builders use the client allocator.

Compatibility is unchanged:

  • a nil allocator falls back to memory.DefaultAllocator
  • DSN-based connections continue using the default because an allocator cannot be encoded in a connection string
  • programmatic connector configuration can supply a custom allocator

Coverage

The prepared-statement test uses a concurrency-safe recording allocator and verifies that parameter construction allocates through the configured instance.

Validation

go test ./arrow/flight/flightsql/driver

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 30, 2026 19:50
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.

[Go][FlightSQL driver] Allow parameterization of memory allocator

1 participant