Repository navigation
[misc] Remove unused classes across modules - #10815
Draft
chenjian2664 wants to merge 1 commit into
Draft
chenjian2664 wants to merge 1 commit into
chenjian2664 wants to merge 1 commit into
Conversation
Remove classes in paimon-common that no production code references: CastedVector, SortContext, BinaryRowDataUtil, BooleanArrayList, ListDelimitedSerializer, MapBuilder, ReuseByteArrayOutputStream and SerializablePredicate. Also remove classes whose last production caller was removed by an earlier refactor, together with the tests that only covered them: LocalFileUtils, LongTripleArrayList, ObjectUtils and ConstantGlobalIndexReader. GlobalIndexScanner now unions readers instead of padding shorter indexes, so the padding test is dropped.
chenjian2664
force-pushed
the
chenjian2664/bytequay/remove-unused-classes
branch
from
October 26, 2026 13:46
e5bc1f0 to
33464dd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Remove classes that no code in the repository uses anymore. Each module's removal is a separate commit, so it can be reviewed or reverted on its own.
Two kinds of classes are removed:
Removed per module:
CastedVector,SortContext,BinaryRowDataUtil,BooleanArrayList,ListDelimitedSerializer,MapBuilder,ReuseByteArrayOutputStream,SerializablePredicate, plusLocalFileUtils,LongTripleArrayList,ObjectUtilsandConstantGlobalIndexReader, whose last callers were removed earlier.GlobalIndexScannernow merges readers instead of padding shorter indexes, so the constant padding reader is no longer needed.RowIdIndexFieldsExtractor,IntObjectSerializer.AvroSchemaTypelessReader,JodaConverterand the Parquetpositionpackage.JodaConverterwas the only user of the optionaljoda-timedependency, so that dependency is removed too.CdcRecordPartitionKeyExtractor, andAliyunFieldParser, whichAliyunRecordParserstopped using once it extracted types itself.ScalaSuffixChecker, which no CI script or build configuration runs. The Mavendependency:treeparsing that only it used is removed too:DependencyTree, the tree parsing inDependencyParser, and the scope and optional fields ofDependency.RowDataKeyAndBucketExtractor(unused since the sink moved toInternalRow),NumberSequenceRowSource(no longer built by aggregate push down), and the legacySinkFunctionshim inpaimon-flink1-common(unused since the log system code was removed).SQLHelpertrait.Some classes are unused here but intentionally kept: public or deprecated API, compatibility shims, the Arrow native read/write extension points, Vortex JNI bindings that mirror the upstream native library, Flink CDC pipeline utilities used by the Flink CDC project, and recently added building blocks that are not wired in yet.
Tests
GlobalIndexEvaluatorTestno longer tests padding shorter indexes with a constant reader, which production code no longer does. It still covers how the evaluator ANDs readers that cover different row ranges.CdcRecordKeyAndBucketExtractorTestnow compares the CDC extractor againstFixedBucketRowKeyExtractordirectly. That is the class the removedRowDataKeyAndBucketExtractorwrapped.TestCdcEventParserfalls back to an empty record list inline instead of callingObjectUtils.