JDBC driver does not support compressed IPC streams (ZSTD, LZ4) [FlightSQL]
- 主要言語
- Java
- スター
- 94
- フォーク
- 152
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 11
説明
### Describe the bug, including details regarding any error messages, version, and platform.
**Component:** Flight SQL JDBC Driver
**Version:** 18.3.0
The `flight-sql-jdbc-driver` shaded JAR does not include compression support, causing connection failures when the Flight SQL server sends compressed IPC streams using ZSTD or LZ4 compression.
### Expected Behavior
The JDBC driver should be able to handle compressed IPC streams from Flight SQL servers, similar to how the direct Flight SQL client (`flight-sql` artifact) handles them.
### Actual Behavior
Connection fails with one of these errors depending on compression type used by server:
**ZSTD compression:**
```
java.lang.IllegalArgumentException: Please add arrow-compression module to use CommonsCompressionFactory for ZSTD
at org.apache.arrow.driver.jdbc.shaded.org.apache.arrow.vector.compression.NoCompressionCodec$Factory.createCodec(NoCompressionCodec.java:63)
```
**LZ4 compression:**
```
Arrow error: Invalid argument error: lz4 IPC compression requires the lz4 feature
```
### Steps to Reproduce
1. Set up a Flight SQL server that uses compression (ZSTD or LZ4)
2. Try to connect using the JDBC driver:
String url = "jdbc:arrow-flight-sql://localhost:5127?useEncryption=false";
Connection conn = DriverManager.getConnection(url);
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM table");
// Fails with compression error
### Workaround
Currently, either:
1. Disable compression on the server side, OR
2. Use the direct Flight SQL client API (`flight-sql` and `flight-core` artifacts) instead of JDBC
### Additional Context
- Direct Flight SQL client works fine with compression
- This affects any Flight SQL server that enables compression by default
- JDBC drivers should be able to handle all protocol features transparently
コントリビューションガイド
調査の方向性
まず、flight-sql-jdbc-driver の shaded JAR に含まれる依存関係を flight-sql および flight-core アーティファクトと比較し、その後、ZSTD または LZ4 圧縮を使用するサーバーへの JDBC 接続を再現します。JDBC ドライバーが接続し、圧縮エラーなしで結果を読み取れれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- databases
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100