Skip to content

Core: Remove deprecated APIs for 1.12.0#16452

Open
raushanprabhakar1 wants to merge 1 commit into
apache:mainfrom
raushanprabhakar1:remove-deprecated-core-1.12.0
Open

Core: Remove deprecated APIs for 1.12.0#16452
raushanprabhakar1 wants to merge 1 commit into
apache:mainfrom
raushanprabhakar1:remove-deprecated-core-1.12.0

Conversation

@raushanprabhakar1
Copy link
Copy Markdown

Summary

Removes all Core APIs marked @deprecated ... will be removed in 1.12.0 as part of #16445. This is the first module-wise PR for the 1.12.0 deprecation cleanup.

Deleted classes

  • SystemProperties — use SystemConfigs
  • PartitionStats — use BasePartitionStatistics / PartitionStatistics
  • data.avro.DataReader — use PlannedDataReader

Removed APIs

  • BaseScan.io() — use fileIO().get()
  • TableProperties.MANIFEST_LISTS_ENABLED / _DEFAULT (manifest lists are always enabled)
  • ThreadPools.WORKER_THREAD_POOL_SIZE_PROP, newWorkerPool(...) — use SystemConfigs.WORKER_THREAD_POOL_SIZE / newExitingWorkerPool(...)
  • TableScanUtil.hasDeletes(CombinedScanTask), hasEqDeletes(CombinedScanTask)
  • SystemConfigs.NETFLIX_UNSAFE_PARQUET_ID_FALLBACK_ENABLED (Parquet unsafe ID fallback removed)
  • MetricsConfig.forPositionDelete(Table) — use forPositionDelete()
  • StandardEncryptionManager 2-arg constructor and wrapKey / unwrapKey
  • SnapshotUtil.newFiles(...), newFilesBetween(...) — use SnapshotChanges
  • RESTSessionCatalog.REST_PAGE_SIZE — use RESTCatalogProperties.PAGE_SIZE
  • CatalogHandlers.loadTable(Catalog, TableIdentifier) — use overload with SnapshotMode
  • AvroSchemaUtil.pruneColumns(Schema, Set, NameMapping) — use applyNameMapping + pruneColumns(Schema, Set)
  • ContentCache.invalidateAll()
  • BaseScanTaskResponse.Builder.withDeleteFiles(...) — use withFileScanTasks(...)
  • RawDecoder deprecated constructor — use RawDecoder.create(...)
  • RESTUtil.NAMESPACE_JOINER, NAMESPACE_SPLITTER, encodeNamespace(Namespace), decodeNamespace(String) — use separator-aware overloads
  • ManifestFiles.readPaths/read/open(ManifestFile, FileIO) — use overloads with specsById
  • PartitionStatsHandler deprecated field constants, schema(...), readPartitionStatsFile(...) — use PartitionStatistics equivalents / PartitionStatisticsScan
  • PositionDelete.set(path, pos, row), row() — use set(path, pos) only
  • RewriteTablePathUtil.PositionDeleteReaderWriter.writer(..., Schema rowSchema) — use 4-arg writer(...)
  • HadoopFileIO(SerializableSupplier<Configuration>) — use HadoopFileIO(Configuration)

Note: HadoopFileIO.serializeConfWith(...) is retained without @Deprecated because it is still required by HadoopConfigurable (same as ResolvingFileIO).

Call-site updates outside Core

Spark, Flink, Data, Parquet, and ORC modules were updated where they depended on removed Core APIs (e.g. position-delete set(path, pos) migration, MetricsConfig.forPositionDelete()).

API compatibility

Adds a 1.11.0 section to .palantir/revapi.yml documenting intentional breaks (justification: "Removing deprecated code for 1.12.0").

Test plan

  • ./gradlew :iceberg-core:compileJava :iceberg-core:compileTestJava
  • ./gradlew revapi spotlessCheck
  • ./gradlew :iceberg-core:test --tests "org.apache.iceberg.rest.TestRESTUtil" --tests "org.apache.iceberg.TestManifestReader" --tests "org.apache.iceberg.PartitionStatisticsScanTestBase"
  • Full ./gradlew :iceberg-core:test
  • ./gradlew build -x integrationTest

@raushanprabhakar1 raushanprabhakar1 changed the title removing depreceated methods for 1.12.0 release Core: Remove deprecated APIs for 1.12.0 May 20, 2026
@raushanprabhakar1
Copy link
Copy Markdown
Author

Hi @manuzhang , requesting you to review. Thanks

/**
* @deprecated since 1.11.0, visibility will be reduced in 1.12.0.
*/
@Deprecated
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.

we should also address this deprecation and reduce the visibility

/**
* @deprecated since 1.11.0, visibility will be reduced in 1.12.0.
*/
@Deprecated
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.

same here

@@ -777,7 +777,7 @@ protected <T> PositionDelete<T> positionDelete(CharSequence path, long pos) {

protected <T> PositionDelete<T> positionDelete(CharSequence path, long pos, T row) {
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.

we should probably remove this method entirely instead of silently ignoring row

import org.apache.iceberg.types.Types;
import org.junit.jupiter.api.Test;

public class TestPartitionStats {
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.

is this not used anymore?

.spec(spec)
.build();
} else {
return switch (format) {
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.

can you please elaborate why these changes are being done here? This doesn't seem to be related to removing deprecated APIs

table == null
? MetricsConfig.forPositionDelete()
: MetricsConfig.forPositionDelete(table);
table == null ? MetricsConfig.forPositionDelete() : MetricsConfig.forPositionDelete();
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.

this now does the same thing in both branches

GenericRecord record = GenericRecord.create(finalSchema);
record.setField("file_path", p.path());
record.setField("pos", p.pos());
record.setField("row", formatVersion >= 3 ? null : p.row());
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.

why this change?

table == null
? MetricsConfig.forPositionDelete()
: MetricsConfig.forPositionDelete(table);
: MetricsConfig.forPositionDelete();
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.

this does the same thing in both branches

table == null
? MetricsConfig.forPositionDelete()
: MetricsConfig.forPositionDelete(table);
: MetricsConfig.forPositionDelete();
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.

this does the same thing in both if branches now

Comment thread .palantir/revapi.yml
old: "method org.apache.iceberg.orc.ORC.WriteBuilder org.apache.iceberg.orc.ORC.WriteBuilder::config(java.lang.String,\
\ java.lang.String)"
justification: "Removing deprecations for 1.2.0"
"1.10.0":
Copy link
Copy Markdown
Contributor

@nastra nastra May 21, 2026

Choose a reason for hiding this comment

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

can you please open a separate PR against main where you run the gradle command and where the 1.1.0.0 section is being moved. This is so that we don't introduce this change here, because it's difficult to review

/**
* @deprecated since 1.11.0, will be removed in 1.12.0.
*/
@Deprecated
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.

this only removes the javadoc but not the actual method

@@ -67,7 +67,7 @@ public void update(T row, PartitionSpec spec, StructLike partition) {

@Override
public void delete(CharSequence path, long pos, T row, PartitionSpec spec, StructLike partition) {
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.

we should probably deprecate this method and have a delete method without the row parameter

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.

2 participants