コード例 #1
0
        private void WrapPartitionedStreamHelper <TLeftKey, TRightKey>(PartitionedStream <Pair <TLeftInput, TKey>, TLeftKey> leftHashStream, PartitionedStream <TRightInput, TRightKey> rightPartitionedStream, IPartitionedStreamRecipient <TOutput> outputRecipient, int partitionCount, CancellationToken cancellationToken)
        {
            PartitionedStream <Pair <TRightInput, TKey>, int> stream            = ExchangeUtilities.HashRepartition <TRightInput, TKey, TRightKey>(rightPartitionedStream, this.m_rightKeySelector, this.m_keyComparer, null, cancellationToken);
            PartitionedStream <TOutput, TLeftKey>             partitionedStream = new PartitionedStream <TOutput, TLeftKey>(partitionCount, leftHashStream.KeyComparer, this.OrdinalIndexState);

            for (int i = 0; i < partitionCount; i++)
            {
                partitionedStream[i] = new HashJoinQueryOperatorEnumerator <TLeftInput, TLeftKey, TRightInput, TKey, TOutput>(leftHashStream[i], stream[i], null, this.m_resultSelector, this.m_keyComparer, cancellationToken);
            }
            outputRecipient.Receive <TLeftKey>(partitionedStream);
        }
コード例 #2
0
        private void WrapPartitionedStreamHelper <TLeftKey, TRightKey, TOutputKey>(
            PartitionedStream <Pair <TLeftInput, TKey>, TLeftKey> leftHashStream,
            HashLookupBuilder <IEnumerable <TRightInput>, TRightKey, TKey>[] rightLookupBuilders,
            HashJoinOutputKeyBuilder <TLeftKey, TRightKey, TOutputKey> outputKeyBuilder, IComparer <TOutputKey> outputKeyComparer,
            IPartitionedStreamRecipient <TOutput> outputRecipient, int partitionCount, CancellationToken cancellationToken)
        {
            PartitionedStream <TOutput, TOutputKey> outputStream = new PartitionedStream <TOutput, TOutputKey>(
                partitionCount, outputKeyComparer, OrdinalIndexState);

            for (int i = 0; i < partitionCount; i++)
            {
                outputStream[i] = new HashJoinQueryOperatorEnumerator <TLeftInput, TLeftKey, IEnumerable <TRightInput>, TRightKey, TKey, TOutput, TOutputKey>(
                    leftHashStream[i], rightLookupBuilders[i], _resultSelector, outputKeyBuilder, cancellationToken);
            }

            outputRecipient.Receive(outputStream);
        }