Skip to content

Spark 4.1: Mark overrides of deprecated Spark API as deprecated#16028

Open
manuzhang wants to merge 5 commits into
apache:mainfrom
manuzhang:deprecate-SparkTable-schema
Open

Spark 4.1: Mark overrides of deprecated Spark API as deprecated#16028
manuzhang wants to merge 5 commits into
apache:mainfrom
manuzhang:deprecate-SparkTable-schema

Conversation

@manuzhang

@manuzhang manuzhang commented Apr 18, 2026

Copy link
Copy Markdown
Member

Mark Spark 4.1 overrides of deprecated catalog and table schema methods as deprecated ahead of 1.12.0. Implement the TableInfo catalog methods and route legacy StructType overloads through a shared Spark3Util helper so the active path avoids Spark's deprecated APIs.


Co-authored-by: @codex

@github-actions github-actions Bot added the spark label Apr 18, 2026
Comment thread spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/RollbackStagedTable.java Outdated
@manuzhang manuzhang force-pushed the deprecate-SparkTable-schema branch from 9b89e14 to fe74213 Compare April 19, 2026 09:02
@manuzhang manuzhang changed the title Spark 4.1: Deprecate schema() on Spark Table implementations Spark 4.1: Mark overrides of deprecated Spark API as deprecated Apr 19, 2026
@manuzhang

Copy link
Copy Markdown
Member Author

@huaxingao Fixed previous issues and I extended the scope of this PR to all deprecated Spark API. Please help review again. Thanks!

@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label May 20, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions Bot closed this May 28, 2026
@manuzhang manuzhang reopened this May 28, 2026
@github-actions github-actions Bot removed the stale label May 29, 2026
@manuzhang

Copy link
Copy Markdown
Member Author

@huaxingao @szehon-ho Please help review when you have time. Thanks!

Comment thread spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/RollbackStagedTable.java Outdated

@szehon-ho szehon-ho left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the updates @manuzhang! The approach looks good -- the active path now bypasses Spark's deprecated APIs. Left two small nits inline. A few existing threads still open before I approve:

  • Javadoc style /** ... */ so @deprecated is actually picked up, plus the missing @Deprecated on RollbackStagedTable (@huaxingao's comments).
  • Switching the @deprecated text to {@link #columns()} for consistency across BaseSparkTable / SparkChangelogTable / RollbackStagedTable.
  • Dropping the now-redundant deprecated createTable(StructType, ...) override in SparkRewriteTableCatalog (it only throws UnsupportedOperationException, so the default TableInfo chain routes there anyway).

Once those are in I think this is good to go.

Comment thread spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/Spark3Util.java Outdated
@manuzhang manuzhang requested a review from szehon-ho June 9, 2026 02:14
@manuzhang

Copy link
Copy Markdown
Member Author

@szehon-ho I've updated as requested. Please help review again. Thanks!

@manuzhang manuzhang added this to the Iceberg 1.12.0 milestone Jun 24, 2026
manuzhang and others added 5 commits June 25, 2026 10:27
Mark Spark 4.1 overrides of deprecated catalog and table schema methods as deprecated ahead of 1.12.0. Implement the TableInfo catalog methods and route legacy StructType overloads through a shared Spark3Util helper so the active path avoids Spark's deprecated APIs.

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Szehon Ho <szehon.apache@gmail.com>
Co-authored-by: Szehon Ho <szehon.apache@gmail.com>
Co-authored-by: Szehon Ho <szehon.apache@gmail.com>
Drop the redundant rewrite catalog StructType override, keep the StructType tableInfo helper package-private, and share the cached Spark schema conversion for columns().

Co-authored-by: Codex <codex@openai.com>
@manuzhang manuzhang force-pushed the deprecate-SparkTable-schema branch from 895fc3d to db2a162 Compare June 25, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants