public abstract class BaseColumnComparator extends java.lang.Object implements SequenceComparator, ColumnOp
Modifier and Type | Field and Description |
---|---|
protected int |
columnIdx |
protected java.lang.String |
columnName |
protected Schema |
schema |
Modifier | Constructor and Description |
---|---|
protected |
BaseColumnComparator(java.lang.String columnName) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
columnName()
Returns a singular column name
this op is meant to run on
|
java.lang.String[] |
columnNames()
Returns column names
this op is meant to run on
|
int |
compare(java.util.List<Writable> o1,
java.util.List<Writable> o2) |
protected abstract int |
compare(Writable w1,
Writable w2) |
Schema |
getInputSchema()
Getter for input schema
|
java.lang.String |
outputColumnName()
The output column name
after the operation has been applied
|
java.lang.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
|
protected Schema schema
protected final java.lang.String columnName
protected int columnIdx
public void setSchema(Schema sequenceSchema)
setSchema
in interface SequenceComparator
public Schema transform(Schema inputSchema)
public void setInputSchema(Schema inputSchema)
setInputSchema
in interface ColumnOp
inputSchema
- public Schema getInputSchema()
getInputSchema
in interface ColumnOp
public int compare(java.util.List<Writable> o1, java.util.List<Writable> o2)
compare
in interface java.util.Comparator<java.util.List<Writable>>
public java.lang.String outputColumnName()
outputColumnName
in interface ColumnOp
public java.lang.String[] outputColumnNames()
outputColumnNames
in interface ColumnOp
public java.lang.String[] columnNames()
columnNames
in interface ColumnOp
public java.lang.String columnName()
columnName
in interface ColumnOp