Class WindowRankProcessor
- java.lang.Object
-
- org.apache.druid.query.operator.window.ranking.WindowRankingProcessorBase
-
- org.apache.druid.query.operator.window.ranking.WindowRankProcessor
-
- All Implemented Interfaces:
Processor
public class WindowRankProcessor extends WindowRankingProcessorBase
This Processor assumes that data has already been sorted for it. It does not re-sort the data and if it is given data that is not in the correct sorted order, its operation is undefined.
-
-
Constructor Summary
Constructors Constructor Description WindowRankProcessor(List<String> groupingCols, String outputColumn, boolean asPercent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)inthashCode()booleanisAsPercent()RowsAndColumnsprocess(RowsAndColumns incomingPartition)Applies the logic of the processor to a RowsAndColumns objectStringtoString()booleanvalidateEquivalent(Processor otherProcessor)Validates the equivalence of the Processors.-
Methods inherited from class org.apache.druid.query.operator.window.ranking.WindowRankingProcessorBase
getGroupingCols, getOutputColumn, internalToString, intervalValidation, processInternal
-
-
-
-
Method Detail
-
isAsPercent
public boolean isAsPercent()
-
process
public RowsAndColumns process(RowsAndColumns incomingPartition)
Description copied from interface:ProcessorApplies the logic of the processor to a RowsAndColumns object- Parameters:
incomingPartition- the incoming RowsAndColumns object- Returns:
- the transformed RowsAndColumns object
-
validateEquivalent
public boolean validateEquivalent(Processor otherProcessor)
Description copied from interface:ProcessorValidates the equivalence of the Processors. This is similar to @{code .equals} but is its own method so that it can ignore certain fields that would be important for a true equality check. Namely, two Processors defined the same way but with different output names can be considered equivalent even though they are not equal.This primarily exists to simplify tests, where this equivalence can be used to validate that the Processors created by the SQL planner are actually equivalent to what we expect without needing to be overly dependent on how the planner names the output columns
- Specified by:
validateEquivalentin interfaceProcessor- Overrides:
validateEquivalentin classWindowRankingProcessorBase- Parameters:
otherProcessor- the processor to test equivalence of- Returns:
- boolean identifying if these processors should be considered equivalent to each other.
-
toString
public String toString()
- Overrides:
toStringin classWindowRankingProcessorBase
-
hashCode
public int hashCode()
- Overrides:
hashCodein classWindowRankingProcessorBase
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classWindowRankingProcessorBase
-
-