Skip to content

Remove APIs deprecated in 1.3.0 - #19143

Open
xiangfu0 wants to merge 1 commit into
apache:masterfrom
xiangfu0:xiangfu0/remove-deprecated-1.3
Open

Remove APIs deprecated in 1.3.0#19143
xiangfu0 wants to merge 1 commit into
apache:masterfrom
xiangfu0:xiangfu0/remove-deprecated-1.3

Conversation

@xiangfu0

@xiangfu0 xiangfu0 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Removes APIs whose deprecations shipped in the 1.3.0 cycle (2024 H2 – early 2025). Part of a series of per-release deprecation sweeps.

Every removed member was verified deprecated as of the release-1.3.0 tag and to have zero non-deprecated production callers. Full-reactor test-compile, checkstyle:check, and license:check pass.

Removed

  • FunctionRegistry.containsFunction(String) and getFunctionInfo(String, int)contains(canonicalize(name)) / lookupFunctionInfo(canonicalize(name), n).
  • TransformFunctionType.getAlternativeNames().
  • ScalarFunction.isPlaceholder() annotation attribute — no @ScalarFunction application anywhere set it, and nothing read it.
  • SegmentGeneratorConfig.is/setNullHandlingEnabled and RealtimeSegmentConfig.Builder.setNullHandlingEnabled — pure aliases of the defaultNullHandlingEnabled accessors.
  • Schema.clone() (undocumented shallow copy; cloneSchemaWithName is untouched).
  • QueryContext.Builder.setExplain(boolean) → the ExplainMode overload.
  • ControllerRequestURLBuilder.forSegmentsMetadataFromServer(String, String) → the List<String> overload.
  • SegmentAssignmentUtils.getNumSegmentsToBeMovedPerInstancegetNumSegmentsToMovePerInstance. (The removed version also carried a latent unchecked-get NPE.)
  • BrokerSelectorUtils.getTablesCommonBrokersgetTablesCommonBrokersSet, which returns an empty set rather than null. Its six List-variant tests were dropped; each had a parallel Set-variant test that remains.
  • Dedup SPI: the deprecated checkRecordPresentOrUpdate(PrimaryKey, IndexSegment) is gone from PartitionDedupMetadataManager, and the surviving DedupRecordInfo overload is now a plain abstract method rather than a default that delegated into it. See the compat note below.
  • Dead non-split-commit residue: ServerSegmentCompletionProtocolHandler.segmentCommit(...) and SegmentCompletionProtocol.SegmentCommitRequest, orphaned when Cleanup non split commit code #14559 removed the controller endpoints. These two were never annotated @Deprecated — they are dead code removed alongside their release-line neighbours. MSG_TYPE_COMMIT is retained, with a comment, because it is still the FSM lookup key in SegmentCompletionManager.

Also refreshes the SegmentCompletionProtocol class javadoc, which still described the removed single-shot commit flow, to document the actual split-commit sequence.

backward-incompat

Please apply the backward-incompat label.

Two items deserve explicit release-note treatment:

  1. Custom dedup metadata managers (dedupConfig.metadataManagerClass, loaded reflectively) must now implement checkRecordPresentOrUpdate(DedupRecordInfo, IndexSegment) directly. An implementation that only overrode the deprecated PrimaryKey variant previously worked via the default delegation; it will now fail with AbstractMethodError at ingestion time. Such implementations were already broken in practice — the base class's PrimaryKey override threw UnsupportedOperationException — but the failure mode changes.
  2. Binary-breaking pinot-spi / pinot-segment-spi / pinot-java-client removals: old binaries calling e.g. Schema.clone() will get NoSuchMethodError. Replacements are listed above.

No config keys, wire formats, or ZK-serialized fields are touched.

- FunctionRegistry: remove deprecated containsFunction(String) and getFunctionInfo(String, int); migrate FastJsonPathExtractorTest to lookupFunctionInfo(canonicalize(name), numArguments)
- TransformFunctionType: remove deprecated getAlternativeNames()
- ScalarFunction annotation: remove deprecated isPlaceholder() attribute
- PartitionDedupMetadataManager: remove deprecated checkRecordPresentOrUpdate(PrimaryKey, IndexSegment); make the DedupRecordInfo variant a plain interface method and drop the throwing override in BasePartitionDedupMetadataManager
- SegmentGeneratorConfig: remove deprecated isNullHandlingEnabled()/setNullHandlingEnabled(boolean) aliases; RealtimeSegmentConfig.Builder: remove deprecated setNullHandlingEnabled(boolean)
- Schema: remove deprecated clone() override
- QueryContext.Builder: remove deprecated setExplain(boolean)
- ControllerRequestURLBuilder: remove deprecated forSegmentsMetadataFromServer(String, String)
- SegmentAssignmentUtils: remove deprecated getNumSegmentsToBeMovedPerInstance
- BrokerSelectorUtils: remove deprecated getTablesCommonBrokers; drop its List-variant tests (Set-variant coverage retained)
- Remove dead non-split-commit residue: ServerSegmentCompletionProtocolHandler.segmentCommit and SegmentCompletionProtocol.SegmentCommitRequest (endpoints removed in apache#14559); keep MSG_TYPE_COMMIT as the segment-completion FSM key with a clarifying comment
@xiangfu0 xiangfu0 added the backward-incompat Introduces a backward-incompatible API or behavior change label Aug 1, 2026
@codecov-commenter

codecov-commenter commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.60%. Comparing base (dc95530) to head (c3f4e0a).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #19143      +/-   ##
============================================
- Coverage     65.62%   65.60%   -0.02%     
  Complexity     1423     1423              
============================================
  Files          3439     3439              
  Lines        218195   218142      -53     
  Branches      34669    34662       -7     
============================================
- Hits         143198   143122      -76     
- Misses        63443    63460      +17     
- Partials      11554    11560       +6     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 ?
java-25 65.60% <100.00%> (-0.02%) ⬇️
temurin 65.60% <100.00%> (-0.02%) ⬇️
unittests 65.60% <100.00%> (-0.02%) ⬇️
unittests1 56.97% <100.00%> (-0.03%) ⬇️
unittests2 37.96% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

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.

Pull request overview

This PR performs a 1.3.0-cycle deprecation sweep by removing long-deprecated (and some dead) APIs across Pinot’s SPI, segment, controller, core, and client modules, updating callers/tests accordingly, and aligning the segment-completion protocol documentation with the split-commit flow.

Changes:

  • Removed deprecated public APIs/aliases in pinot-spi, pinot-segment-spi, and pinot-java-client, and migrated internal/test callers to the preferred replacements.
  • Simplified the dedup SPI by removing the deprecated PrimaryKey overload and requiring implementations to provide the DedupRecordInfo overload directly.
  • Removed non-split-commit residue from segment completion (server handler + protocol request type) and refreshed SegmentCompletionProtocol documentation/tests.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pinot-spi/src/main/java/org/apache/pinot/spi/utils/builder/ControllerRequestURLBuilder.java Removes deprecated String columns overload in favor of List<String> overloads.
pinot-spi/src/main/java/org/apache/pinot/spi/data/Schema.java Removes deprecated/incorrect Schema.clone() implementation.
pinot-spi/src/main/java/org/apache/pinot/spi/annotations/ScalarFunction.java Removes deprecated isPlaceholder annotation attribute.
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/SegmentGeneratorConfig.java Removes deprecated null-handling alias accessors; keeps defaultNullHandlingEnabled accessors.
pinot-segment-local/src/test/java/org/apache/pinot/segment/local/dedup/BasePartitionDedupMetadataManagerTest.java Updates dummy metadata manager to implement the now-required dedup method overload.
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/RealtimeSegmentConfig.java Removes deprecated builder alias setNullHandlingEnabled.
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/dedup/PartitionDedupMetadataManager.java Removes deprecated PrimaryKey overload and makes DedupRecordInfo overload abstract.
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/dedup/BasePartitionDedupMetadataManager.java Removes deprecated PrimaryKey overload implementation.
pinot-core/src/main/java/org/apache/pinot/server/realtime/ServerSegmentCompletionProtocolHandler.java Removes dead non-split segmentCommit(...) path and associated imports.
pinot-core/src/main/java/org/apache/pinot/core/query/request/context/QueryContext.java Removes deprecated Builder.setExplain(boolean) in favor of ExplainMode.
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/segment/SegmentAssignmentUtils.java Removes deprecated getNumSegmentsToBeMovedPerInstance in favor of getNumSegmentsToMovePerInstance.
pinot-common/src/test/java/org/apache/pinot/common/protocols/SegmentCompletionProtocolTest.java Updates protocol URL test to use split-commit start request.
pinot-common/src/test/java/org/apache/pinot/common/function/FastJsonPathExtractorTest.java Migrates to lookupFunctionInfo(canonicalize(name), n) after removal of deprecated lookup.
pinot-common/src/main/java/org/apache/pinot/common/protocols/SegmentCompletionProtocol.java Updates protocol class Javadoc for split-commit; removes SegmentCommitRequest type; retains MSG_TYPE_COMMIT for FSM lookup.
pinot-common/src/main/java/org/apache/pinot/common/function/TransformFunctionType.java Removes deprecated getAlternativeNames() alias.
pinot-common/src/main/java/org/apache/pinot/common/function/FunctionRegistry.java Removes deprecated containsFunction and getFunctionInfo wrappers.
pinot-clients/pinot-java-client/src/test/java/org/apache/pinot/client/utils/BrokerSelectorUtilsTest.java Drops tests for removed deprecated list-returning API variant.
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/utils/BrokerSelectorUtils.java Removes deprecated getTablesCommonBrokers list-returning API.

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

Labels

backward-incompat Introduces a backward-incompatible API or behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants