public class Rename extends Operator
Modifier and Type | Field and Description |
---|---|
private DbIterator |
child |
private int |
inField |
private java.lang.String |
newName |
private static long |
serialVersionUID |
private TupleDesc |
td |
Constructor and Description |
---|
Rename(int inField,
java.lang.String newName,
DbIterator child) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this iterator.
|
protected Tuple |
fetchNext()
Returns the next Tuple in the iterator, or null if the iteration is
finished.
|
DbIterator[] |
getChildren() |
TupleDesc |
getTupleDesc()
Returns the TupleDesc associated with this DbIterator.
|
java.lang.String |
newName() |
void |
open()
Opens the iterator.
|
int |
renamedField() |
void |
rewind()
Resets the iterator to the start.
|
void |
setChildren(DbIterator[] children)
Set the children(child) of this operator.
|
private void |
updateTD() |
getEstimatedCardinality, hasNext, next, setEstimatedCardinality
private static final long serialVersionUID
private int inField
private java.lang.String newName
private DbIterator child
private TupleDesc td
public Rename(int inField, java.lang.String newName, DbIterator child)
public java.lang.String newName()
public int renamedField()
public void open() throws DbException, TransactionAbortedException
DbIterator
open
in interface DbIterator
open
in class Operator
DbException
- when there are problems opening/accessing the database.TransactionAbortedException
public void close()
Operator
close
in interface DbIterator
close
in class Operator
public void rewind() throws DbException, TransactionAbortedException
DbIterator
DbException
- when rewind is unsupported.TransactionAbortedException
protected Tuple fetchNext() throws DbException, TransactionAbortedException
Operator
next
and hasNext
.fetchNext
in class Operator
DbException
TransactionAbortedException
public DbIterator[] getChildren()
getChildren
in class Operator
public void setChildren(DbIterator[] children)
Operator
setChildren
in class Operator
children
- the DbIterators which are to be set as the children(child) of
this operatorpublic TupleDesc getTupleDesc()
DbIterator
getTupleDesc
in interface DbIterator
getTupleDesc
in class Operator
private void updateTD()