public abstract class ValueBoundaryScanner extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
nullsLast |
| Constructor and Description |
|---|
ValueBoundaryScanner(BoundaryDef start,
BoundaryDef end,
boolean nullsLast) |
| Modifier and Type | Method and Description |
|---|---|
abstract int |
computeEnd(int rowIdx,
PTFPartition p) |
abstract int |
computeStart(int rowIdx,
PTFPartition p) |
abstract Object |
computeValue(Object row) |
protected Object |
computeValueUseCache(int r,
PTFPartition p)
Uses cache to lookup row value.
|
static ValueBoundaryScanner |
getScanner(WindowFrameDef winFrameDef,
boolean nullsLast) |
void |
handleCache(int rowIdx,
PTFPartition p)
Checks and maintains cache content - optimizes cache window to always be around current row
thereby makes it follow the current progress.
|
abstract boolean |
isDistanceGreater(Object v1,
Object v2,
int amt)
Checks if the distance of v2 to v1 is greater than the given amt.
|
abstract boolean |
isEqual(Object v1,
Object v2)
Checks if the values of v1 or v2 are the same.
|
protected org.apache.commons.lang3.tuple.Pair<Integer,Object> |
skipOrStepBack(int r,
PTFPartition p)
Uses cache content to jump backwards if possible.
|
protected org.apache.commons.lang3.tuple.Pair<Integer,Object> |
skipOrStepForward(int r,
PTFPartition p)
Uses cache content to jump forward if possible.
|
public ValueBoundaryScanner(BoundaryDef start, BoundaryDef end, boolean nullsLast)
public abstract Object computeValue(Object row) throws HiveException
HiveExceptionpublic abstract boolean isDistanceGreater(Object v1, Object v2, int amt)
public abstract boolean isEqual(Object v1, Object v2)
public abstract int computeStart(int rowIdx,
PTFPartition p)
throws HiveException
HiveExceptionpublic abstract int computeEnd(int rowIdx,
PTFPartition p)
throws HiveException
HiveExceptionpublic void handleCache(int rowIdx,
PTFPartition p)
throws HiveException
rowIdx - current rowp - current partition for the PTF operatorHiveExceptionprotected org.apache.commons.lang3.tuple.Pair<Integer,Object> skipOrStepBack(int r, PTFPartition p) throws HiveException
r - p - HiveExceptionprotected org.apache.commons.lang3.tuple.Pair<Integer,Object> skipOrStepForward(int r, PTFPartition p) throws HiveException
r - p - HiveExceptionprotected Object computeValueUseCache(int r, PTFPartition p) throws HiveException
r - p - HiveExceptionpublic static ValueBoundaryScanner getScanner(WindowFrameDef winFrameDef, boolean nullsLast) throws HiveException
HiveExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.