public abstract class BaseColumnComparator extends Object implements SequenceComparator, ColumnOp
| Modifier and Type | Field and Description |
|---|---|
protected int |
columnIdx |
protected String |
columnName |
protected Schema |
schema |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseColumnComparator(String columnName) |
| Modifier and Type | Method and Description |
|---|---|
String |
columnName()
Returns a singular column name
this op is meant to run on
|
String[] |
columnNames()
Returns column names
this op is meant to run on
|
int |
compare(List<Writable> o1,
List<Writable> o2) |
protected abstract int |
compare(Writable w1,
Writable w2) |
Schema |
getInputSchema()
Getter for input schema
|
String |
outputColumnName()
The output column name
after the operation has been applied
|
String[] |
outputColumnNames()
The output column names
This will often be the same as the input
|
void |
setInputSchema(Schema inputSchema)
Set the input schema.
|
void |
setSchema(Schema sequenceSchema) |
Schema |
transform(Schema inputSchema)
Get the output schema for this transformation, given an input schema
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongprotected Schema schema
protected final String columnName
protected int columnIdx
protected BaseColumnComparator(String columnName)
public void setSchema(Schema sequenceSchema)
setSchema in interface SequenceComparatorpublic Schema transform(Schema inputSchema)
public void setInputSchema(Schema inputSchema)
setInputSchema in interface ColumnOpinputSchema - public Schema getInputSchema()
getInputSchema in interface ColumnOppublic int compare(List<Writable> o1, List<Writable> o2)
compare in interface Comparator<List<Writable>>public String outputColumnName()
outputColumnName in interface ColumnOppublic String[] outputColumnNames()
outputColumnNames in interface ColumnOppublic String[] columnNames()
columnNames in interface ColumnOppublic String columnName()
columnName in interface ColumnOpCopyright © 2017. All rights reserved.