Skip to content

deprecate flight_data_to_arrow_batch - #10256

Closed
Rich-T-kid wants to merge 1 commit into
apache:mainfrom
Rich-T-kid:rich-T-kid/deprecate-flight-data-to-batch
Closed

Rich-T-kid wants to merge 1 commit into
apache:mainfrom
Rich-T-kid:rich-T-kid/deprecate-flight-data-to-batch

Conversation

@Rich-T-kid

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

after #10206 flight_to_arrow_batch was only used in one location, within a test function. It served as a thin wrapper over read_record_batch. since #10206 made read_record_batch public callers should just call it directly

What changes are included in this PR?

  • Updates the two internal callsites of flight_data_to_arrow_batch to call arrow_ipc::reader::read_record_batch directly, and marks the function as deprecated since 59.1.0 pointing callers to do the same.

Are these changes tested?

yes. the changes are to test

Are there any user-facing changes?

yes, users will now receive a deprecated warning, guiding them to use read_record_batch() directly

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

closes #10249

Comment thread arrow-flight/src/utils.rs
since = "59.1.0",
note = "Use `arrow_ipc::reader::read_record_batch` directly instead"
)]
pub fn flight_data_to_arrow_batch(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

read_record_batch isn't a direct replacement -- there seems to be a bunch of other ceremony required( aka 20 lines of code)

I am not sure we should deprecate this 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

true, It would force downstream users to manually parse the header each time. closing the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate arrow-flight arrow-flight crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deprecate flight_data_to_arrow_batch and expose read_record_batch directly

2 participants