HasNext checks if there is a next Tuple in either of the two TupleIterators.
()
| 54 | |
| 55 | // HasNext checks if there is a next Tuple in either of the two TupleIterators. |
| 56 | func (i *UniqueTupleIterator) HasNext() bool { |
| 57 | // If either iterator has a next Tuple, return true |
| 58 | return i.iterator1.HasNext() || i.iterator2.HasNext() |
| 59 | } |
| 60 | |
| 61 | // GetNext returns the next unique Tuple from the two TupleIterators. |
| 62 | func (i *UniqueTupleIterator) GetNext() (*base.Tuple, bool) { |