[Python] Add experimental Arrow Flight support#122
Open
teodordelibasic-db wants to merge 13 commits intomainfrom
Open
[Python] Add experimental Arrow Flight support#122teodordelibasic-db wants to merge 13 commits intomainfrom
teodordelibasic-db wants to merge 13 commits intomainfrom
Conversation
Signed-off-by: teodor-delibasic_data <teodor.delibasic@databricks.com>
Signed-off-by: teodor-delibasic_data <teodor.delibasic@databricks.com>
ec5d56d to
b932a2c
Compare
Comment on lines
+86
to
+87
| # Re-export configuration from Rust core | ||
| ArrowStreamConfigurationOptions = _core.arrow.ArrowStreamConfigurationOptions |
Contributor
There was a problem hiding this comment.
Maybe instead of just reexporting the name here, you should define the wrapper inside _zerobus_core.pyi, similar to how other classes are defined (StreamConfigurationOptions,RecordType...), with proper docs comments
Signed-off-by: teodor-delibasic_data <teodor.delibasic@databricks.com>
Signed-off-by: teodor-delibasic_data <teodor.delibasic@databricks.com>
… types Signed-off-by: teodor-delibasic_data <teodor.delibasic@databricks.com>
Signed-off-by: teodor-delibasic_data <teodor.delibasic@databricks.com>
…ently dropping 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>
Signed-off-by: teodor-delibasic_data <teodor.delibasic@databricks.com>
Signed-off-by: teodor-delibasic_data <teodor.delibasic@databricks.com>
| pa = _check_pyarrow() | ||
| if isinstance(batch, pa.Table): | ||
| if batch.num_rows == 0: | ||
| raise ValueError("Cannot ingest an empty pyarrow.Table") |
Contributor
There was a problem hiding this comment.
we should have this check in case of a record batch is sent as well right?
|
|
||
| These tests verify the Python-side Arrow serialization/deserialization helpers, | ||
| the ArrowStreamConfigurationOptions pyclass, and the API surface of Arrow stream | ||
| classe, without making network connections. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are proposed in this pull request?
Arrow Flight is disabled from Zerobus server side by default
pyarrow.RecordBatchandpyarrow.Tablevia Arrow Flight protocolpip install databricks-zerobus-ingest-sdk[arrow]ZerobusArrowStream(sync + async),ArrowStreamConfigurationOptionscreate_arrow_stream(),recreate_arrow_stream()Possible follow-ups (internal, no public API changes):
pyarrow→ IPC bytes → RustRecordBatch→ IPC again for Flight. Can skip the middle step and pass IPC bytes directly toFlightData.PyCapsule— use Arrow C Data Interface (__arrow_c_array__()) to cross the Python-Rust boundary without any serialization.How is this tested?
Added new unit tests.