apache / apache/arrow-java

JDBC driver does not support compressed IPC streams (ZSTD, LZ4) [FlightSQL]

未關閉
#926 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
help wanted Type: bug
主要語言
Java
星號
94
分支
152
平均合併
3 天 16 小時
30 天內合併 PR
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

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。