Remove CardinalityAggregatorColumnSelectorStrategy and CardinalityAggregatorColumnSelectorStrategyFactory as too shallow abstractions.
- Dominant language
- Java
- Stars
- 14.1k
- Forks
- 3.8k
- Avg merge
- 2d 58m
- Merged PRs (30d)
- 233
Description
The logic of `CardinalityAggregatorColumnSelectorStrategyFactory` could be inlined in `CardinalityAggregatorFactory.factorize()` and `factorizeBuffered()` methods, and the logic of `CardinalityAggregatorColumnSelectorStrategy` could be expressed in subclasses of `CardinalityBufferAggregator` and `CardinalityAggregator`.
This change is similar to what is proposed here: https://github.com/apache/incubator-druid/pull/6397#discussion_r250564034
Contributor guide
Research direction
Start with CardinalityAggregatorColumnSelectorStrategyFactory and CardinalityAggregatorFactory.factorize() and factorizeBuffered(), then inspect CardinalityAggregatorColumnSelectorStrategy with CardinalityBufferAggregator and CardinalityAggregator. Compare the proposed inlining and subclass approach with the linked pull request discussion. Done means both shallow strategy abstractions are removed and their logic is preserved in the factory methods and aggregator subclasses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100