Skip to content

GH-49252: [GLib] Deprecate Feather features#49673

Merged
raulcd merged 1 commit intoapache:mainfrom
kou:glib-feather-deprecate
Apr 7, 2026
Merged

GH-49252: [GLib] Deprecate Feather features#49673
raulcd merged 1 commit intoapache:mainfrom
kou:glib-feather-deprecate

Conversation

@kou
Copy link
Copy Markdown
Member

@kou kou commented Apr 7, 2026

Rationale for this change

We'll deprecate Feather V1 reader/writer. See also the discussion at https://lists.apache.org/thread/1npvnhjb1xwz09zh8vnd079zt2q4o08l .

We can use IPC file reader/writer for Feather V2.

What changes are included in this PR?

  • Add deprecation warnings to Feather features.
  • Use GARROW_DEPRECATED()/GARROW_DEPRECATED_FOR() instead of G_GNUC_DEPRECATED()/G_GNUC_DEPRECATED_FOR().

Are these changes tested?

Yes.

Are there any user-facing changes?

Yes.

Copilot AI review requested due to automatic review settings April 7, 2026 01:08
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

⚠️ GitHub issue #49252 has been automatically assigned in GitHub to PR creator.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR deprecates Apache Arrow GLib’s Feather APIs (notably Feather V1 reader/writer surfaces) and standardizes deprecation annotations by switching to GARROW_DEPRECATED* macros.

Changes:

  • Add GARROW_DEPRECATED_IN_24_0 / GARROW_DEPRECATED_IN_24_0_FOR(...) annotations to Feather-related APIs.
  • Replace direct GLib deprecation attributes (G_GNUC_DEPRECATED*) with Arrow-GLib wrappers (GARROW_DEPRECATED*).
  • Deprecate raw GIO*Stream accessors via GARROW_DEPRECATED.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
c_glib/arrow-glib/table.h Deprecates Feather write properties + table Feather writer API.
c_glib/arrow-glib/reader.h Switches deprecated annotations and deprecates Feather file reader APIs.
c_glib/arrow-glib/output-stream.h Uses GARROW_DEPRECATED for deprecated raw GIO output stream accessor.
c_glib/arrow-glib/input-stream.h Uses GARROW_DEPRECATED for deprecated raw GIO input stream accessor.
Comments suppressed due to low confidence (1)

c_glib/arrow-glib/table.h:176

  • GARROW_DEPRECATED_IN_24_0_FOR(garrow_record_batch_file_writer_new) suggests a direct replacement, but garrow_table_write_as_feather() writes a whole table in Feather format whereas garrow_record_batch_file_writer_new() only constructs a writer and requires additional steps (schema, write_table, close) and produces IPC file format rather than Feather. Consider dropping _FOR (use GARROW_DEPRECATED_IN_24_0) or pointing at the most appropriate entry point for the migration (for example the writer creation + garrow_record_batch_writer_write_table/garrow_record_batch_writer_close).
GARROW_AVAILABLE_IN_0_17
GARROW_DEPRECATED_IN_24_0_FOR(garrow_record_batch_file_writer_new)
gboolean
garrow_table_write_as_feather(GArrowTable *table,
                              GArrowOutputStream *sink,
                              GArrowFeatherWriteProperties *properties,
                              GError **error);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

};

GARROW_AVAILABLE_IN_0_17
GARROW_DEPRECATED_IN_24_0_FOR(garrow_write_options_new)
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

GARROW_DEPRECATED_IN_24_0_FOR(garrow_write_options_new) is likely misleading here: GArrowFeatherWriteProperties configures Feather write behavior, while GArrowWriteOptions is for Arrow IPC serialization. If there isn’t a 1:1 replacement API, prefer using GARROW_DEPRECATED_IN_24_0 (without _FOR) or point to a closer replacement specific to the intended migration path (e.g., IPC file writer + options).

Suggested change
GARROW_DEPRECATED_IN_24_0_FOR(garrow_write_options_new)
GARROW_DEPRECATED_IN_24_0

Copilot uses AI. Check for mistakes.
garrow_feather_file_reader_get_version(GArrowFeatherFileReader *reader);

GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_24_0_FOR(garrow_record_batch_reader_read_all)
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

GARROW_DEPRECATED_IN_24_0_FOR(garrow_record_batch_reader_read_all) doesn’t look like a valid replacement: garrow_record_batch_reader_read_all() takes a GArrowRecordBatchReader*, but this API works on GArrowFeatherFileReader*, and GArrowRecordBatchFileReader is not a GArrowRecordBatchReader. If there’s no single drop-in replacement, use GARROW_DEPRECATED_IN_24_0 (no _FOR) or reference a concrete, correct alternative flow (e.g., garrow_record_batch_file_reader_new() + reading record batches).

Suggested change
GARROW_DEPRECATED_IN_24_0_FOR(garrow_record_batch_reader_read_all)
GARROW_DEPRECATED_IN_24_0

Copilot uses AI. Check for mistakes.
@kou
Copy link
Copy Markdown
Member Author

kou commented Apr 7, 2026

@raulcd Can we merge this for 24.0.0? This just adds deprecation warnings to Feature related features.

Copy link
Copy Markdown
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

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

I don't think the comments from copilot are relevant as we want to direct users to ipc from feather. Will merge for 24.0.0. @kou is there anything else here to be done or shall we just merge?

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels Apr 7, 2026
@kou
Copy link
Copy Markdown
Member Author

kou commented Apr 7, 2026

No! We can merge this as-is for 24.0.0!

@raulcd raulcd merged commit 1f94910 into apache:main Apr 7, 2026
18 checks passed
@raulcd raulcd removed the awaiting merge Awaiting merge label Apr 7, 2026
@kou kou deleted the glib-feather-deprecate branch April 7, 2026 08:18
@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 1f94910.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 13 possible false positives for unstable benchmarks that are known to sometimes produce them.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants