Skip to content

[Java] Add configurable IPC compression for Arrow streams#154

Open
danilonajkov-db wants to merge 4 commits intomainfrom
java-compression
Open

[Java] Add configurable IPC compression for Arrow streams#154
danilonajkov-db wants to merge 4 commits intomainfrom
java-compression

Conversation

@danilonajkov-db
Copy link
Contributor

What changes are proposed in this pull request?

  • Adds IPCCompressionType enum (NONE, LZ4_FRAME, ZSTD) to configure Arrow IPC compression
  • Adds ipcCompression field to ArrowStreamConfigurationOptions with builder support
  • Updates Rust JNI bridge to read the Java enum and map it to arrow_ipc::CompressionType

How is this tested?

Added integration tests + ran the sample client with all kinds of compressions

@danilonajkov-db danilonajkov-db changed the title changes [Java] Add configurable IPC compression for Arrow streams Mar 23, 2026
@danilonajkov-db danilonajkov-db marked this pull request as ready for review March 23, 2026 10:17
Comment on lines +303 to +306
public ArrowStreamConfigurationOptionsBuilder setIpcCompression(
IPCCompressionType ipcCompression) {
this.ipcCompression = ipcCompression;
return this;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if someone sends a null? Claude says this can happen:

sdk.createArrowStream(tableName, schema, clientId, clientSecret, options);
// throws NullPointerException deep in JNI with no useful message

If someone passes null, it gets stored and then JNI calls ordinal() on it, which throws a NullPointerException with no useful message. Worth adding a null check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, i've set it as if null is provided it will default to no compression

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.

2 participants