org.apache.solr.client.solrj.io.stream

## Class OuterHashJoinStream

- java.lang.Object
- - org.apache.solr.client.solrj.io.stream.TupleStream
  - - org.apache.solr.client.solrj.io.stream.HashJoinStream
    - - org.apache.solr.client.solrj.io.stream.OuterHashJoinStream

All Implemented Interfaces:
  Closeable, Serializable, AutoCloseable, Expressible, MapSerializable, MapWriter, NavigableObject

    public class OuterHashJoinStream
    extends HashJoinStream
    implements Expressible

Takes two streams (fullStream and hashStream) and joins them similar to an LeftOuterJoinStream. The difference in a OuterHashJoinStream is that the tuples in the hashStream will all be read and hashed when this stream is opened. This provides a few optimizations iff the hashStream has a relatively small number of documents. The difference between this and a HashJoinStream is that a tuple in the fullStream will be returned even if it doesn't have any matching tuples in the hashStream. You are expected to provide a set of fields for which the hash will be calculated from. If a tuple from the hashStream does not contain a value (ie, null) for one of the fields the hash is being computed on then that tuple will not be considered a match to anything. If a tuple from the fullStream does not contain a value (ie, null) for one of the fields the hash is being computed on then that tuple will be returned without any joined tuples from the hashStream

Since:
  6.0.0
See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.solr.client.solrj.io.stream.TupleStream

`TupleStream.IgnoreException`

### Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter

`MapWriter.EntryWriter`

### Field Summary

### Fields inherited from class org.apache.solr.client.solrj.io.stream.HashJoinStream

`fullStream, hashedTuples, hashStream, leftHashOn, rightHashOn, workingFullHash, workingFullTuple, workngHashSetIdx`

### Constructor Summary

Constructors
Constructor and Description
`OuterHashJoinStream(StreamExpression expression, StreamFactory factory)`
`OuterHashJoinStream(TupleStream fullStream, TupleStream hashStream, List<String> hashOn)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Tuple` `read()`
`StreamExpression` `toExpression(StreamFactory factory)`

### Methods inherited from class org.apache.solr.client.solrj.io.stream.HashJoinStream

`children, close, computeHash, getCost, getStreamSort, open, setStreamContext, toExplanation`

### Methods inherited from class org.apache.solr.client.solrj.io.stream.TupleStream

`getShards, getShards, getStreamNodeId, writeMap`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.apache.solr.client.solrj.io.stream.expr.Expressible

`toExplanation`

### Methods inherited from interface org.apache.solr.common.MapWriter

`jsonStr, toMap`

### Methods inherited from interface org.apache.solr.common.NavigableObject

`_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr`

### Constructor Detail

#### OuterHashJoinStream

    public OuterHashJoinStream(TupleStream fullStream,
                               TupleStream hashStream,
                               List<String> hashOn)
                        throws IOException

Throws:
  `IOException`

#### OuterHashJoinStream

    public OuterHashJoinStream(StreamExpression expression,
                               StreamFactory factory)
                        throws IOException

Throws:
  `IOException`

### Method Detail

#### toExpression

    public StreamExpression toExpression(StreamFactory factory)
                                  throws IOException

Specified by:
  `toExpression` in interface `Expressible`
Overrides:
  `toExpression` in class `HashJoinStream`
Throws:
  `IOException`

#### read

    public Tuple read()
               throws IOException

Overrides:
  `read` in class `HashJoinStream`
Throws:
  `IOException`