Skip to content

[Python] Support configurable Arrow compression#145

Merged
teodordelibasic-db merged 5 commits intomainfrom
python-arrow-compression
Mar 18, 2026
Merged

[Python] Support configurable Arrow compression#145
teodordelibasic-db merged 5 commits intomainfrom
python-arrow-compression

Conversation

@teodordelibasic-db
Copy link
Contributor

What changes are proposed in this pull request?

Previous PR missed to add configurable compression type to Python Arrow support.

How is this tested?

Added conversion UTs.

Comment on lines +127 to +128
#[pyo3(get, set)]
pub ipc_compression: Option<String>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we go with String? Could it be an enum? So we don't have to do any string matching

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, good idea.

Comment on lines +22 to +25
fn ipc_bytes_to_record_batch(ipc_bytes: &[u8]) -> Result<arrow_array::RecordBatch, RustError> {
let mut reader = arrow_ipc::reader::StreamReader::try_new(ipc_bytes, None).map_err(|e| {
RustError::InvalidArgument(format!("Failed to parse Arrow IPC data: {}", e))
})?;
Copy link
Contributor

Choose a reason for hiding this comment

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

I see a lot of these formatting changes. Were they causing some fmt errors? And if they did, how come we didn't see them before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch, we previously didn't run formatting of python/rust/*.rs files and we didn't check their formatting in the CI. I added both.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great, thanks!

Signed-off-by: teodor-delibasic_data <teodor.delibasic@databricks.com>
Signed-off-by: teodor-delibasic_data <teodor.delibasic@databricks.com>
Signed-off-by: teodor-delibasic_data <teodor.delibasic@databricks.com>
Signed-off-by: teodor-delibasic_data <teodor.delibasic@databricks.com>
Signed-off-by: teodor-delibasic_data <teodor.delibasic@databricks.com>
@teodordelibasic-db teodordelibasic-db added this pull request to the merge queue Mar 18, 2026
Merged via the queue into main with commit c84821e Mar 18, 2026
20 checks passed
@teodordelibasic-db teodordelibasic-db deleted the python-arrow-compression branch March 18, 2026 16:25
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