Skip to content

Conversation

vandop
Copy link
Owner

@vandop vandop commented Jun 24, 2025

Summary

This PR adds support for custom User-Agent headers in the Flight SQL JDBC driver.

Changes

  • Added custom User-Agent header functionality to Flight SQL JDBC driver
  • Ensures proper identification of client applications when connecting to Flight SQL servers

Purpose

This enhancement allows applications using the Flight SQL JDBC driver to:

  • Set custom User-Agent headers for better client identification
  • Improve debugging and monitoring capabilities on the server side
  • Follow standard HTTP practices for client identification

Testing

  • Unit tests added/updated
  • Integration tests verified
  • Manual testing completed

Notes

This PR is created on my personal fork for colleague review before potential submission to the upstream Apache Arrow repository.


Ready for Review 🔍

Please review the changes and provide feedback. Once approved here, we can consider submitting this to the upstream Apache Arrow project.


Pull Request opened by Augment Code with guidance from the PR author

This commit adds a custom User-Agent header to the Arrow Flight SQL JDBC driver
to provide client information to the server. The implementation:

- Creates a new UserAgentUtils class to generate a standardized User-Agent string
- Includes driver version, OS information, Java version, and client application name
- Uses a custom header name "x-arrow-user-agent" to avoid conflicts with HTTP/2 reserved headers
- Caches the driver version to improve performance
- Adds unit tests to verify the functionality

The User-Agent string follows the format:
"ArrowFlightJDBC/<version> (<OS>; <Java version>; <client app>)"

This allows servers to track client versions and implement version-specific
workarounds if needed.
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