Streamable.Reduce Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Reduce<TOuterKey,TMapInputLeft,TMapInputRight,TInnerKey,TReduceInput, TSelectorInput,TOutput>(IMapDefinition<TOuterKey,TMapInputLeft, TMapInputRight,TInnerKey,TReduceInput>, Func<IStreamable<CompoundGroupKey<TOuterKey, TInnerKey>,TReduceInput>,IStreamable<CompoundGroupKey<TOuterKey, TInnerKey>,TSelectorInput>>, Expression<Func<GroupSelectorInput<TInnerKey>, TSelectorInput,TOutput>>)
Single-input reducer. Takes a mapped stream and applies a stream valued function (reducer) to each of the partitions. The result selector allows the reintroduction of the grouping key to the output in case it has been lost in the apply function.
public static Microsoft.StreamProcessing.IStreamable<TOuterKey,TOutput> Reduce<TOuterKey,TMapInputLeft,TMapInputRight,TInnerKey,TReduceInput,TSelectorInput,TOutput> (this Microsoft.StreamProcessing.IMapDefinition<TOuterKey,TMapInputLeft,TMapInputRight,TInnerKey,TReduceInput> mapDefinition, Func<Microsoft.StreamProcessing.IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<TOuterKey,TInnerKey>,TReduceInput>,Microsoft.StreamProcessing.IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<TOuterKey,TInnerKey>,TSelectorInput>> reducer, System.Linq.Expressions.Expression<Func<Microsoft.StreamProcessing.GroupSelectorInput<TInnerKey>,TSelectorInput,TOutput>> resultSelector);
static member Reduce : Microsoft.StreamProcessing.IMapDefinition<'OuterKey, 'MapInputLeft, 'MapInputRight, 'InnerKey, 'ReduceInput> * Func<Microsoft.StreamProcessing.IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<'OuterKey, 'InnerKey>, 'ReduceInput>, Microsoft.StreamProcessing.IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<'OuterKey, 'InnerKey>, 'SelectorInput>> * System.Linq.Expressions.Expression<Func<Microsoft.StreamProcessing.GroupSelectorInput<'InnerKey>, 'SelectorInput, 'Output>> -> Microsoft.StreamProcessing.IStreamable<'OuterKey, 'Output>
<Extension()>
Public Function Reduce(Of TOuterKey, TMapInputLeft, TMapInputRight, TInnerKey, TReduceInput, TSelectorInput, TOutput) (mapDefinition As IMapDefinition(Of TOuterKey, TMapInputLeft, TMapInputRight, TInnerKey, TReduceInput), reducer As Func(Of IStreamable(Of CompoundGroupKey(Of TOuterKey, TInnerKey), TReduceInput), IStreamable(Of CompoundGroupKey(Of TOuterKey, TInnerKey), TSelectorInput)), resultSelector As Expression(Of Func(Of GroupSelectorInput(Of TInnerKey), TSelectorInput, TOutput))) As IStreamable(Of TOuterKey, TOutput)
Type Parameters
- TOuterKey
- TMapInputLeft
- TMapInputRight
- TInnerKey
- TReduceInput
- TSelectorInput
- TOutput
Parameters
- reducer
- Func<IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<TOuterKey,TInnerKey>,TReduceInput>,IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<TOuterKey,TInnerKey>,TSelectorInput>>
- resultSelector
- Expression<Func<Microsoft.StreamProcessing.GroupSelectorInput<TInnerKey>,TSelectorInput,TOutput>>
Returns
Applies to
Reduce<TOuterKey,TMapInputLeft,TMapInputRight,TInnerKey,TReduceInput>(IMapDefinition<TOuterKey,TMapInputLeft,TMapInputRight,TInnerKey,TReduceInput>)
Empty reducer. Follows a map operator in situations where the mapper is being used to parallelize a stateless query. It simply unmaps the input
public static Microsoft.StreamProcessing.IStreamable<TOuterKey,TReduceInput> Reduce<TOuterKey,TMapInputLeft,TMapInputRight,TInnerKey,TReduceInput> (this Microsoft.StreamProcessing.IMapDefinition<TOuterKey,TMapInputLeft,TMapInputRight,TInnerKey,TReduceInput> mapDefinition);
static member Reduce : Microsoft.StreamProcessing.IMapDefinition<'OuterKey, 'MapInputLeft, 'MapInputRight, 'InnerKey, 'ReduceInput> -> Microsoft.StreamProcessing.IStreamable<'OuterKey, 'ReduceInput>
<Extension()>
Public Function Reduce(Of TOuterKey, TMapInputLeft, TMapInputRight, TInnerKey, TReduceInput) (mapDefinition As IMapDefinition(Of TOuterKey, TMapInputLeft, TMapInputRight, TInnerKey, TReduceInput)) As IStreamable(Of TOuterKey, TReduceInput)
Type Parameters
- TOuterKey
- TMapInputLeft
- TMapInputRight
- TInnerKey
- TReduceInput
Parameters
Returns
Applies to
Reduce<TOuterKey,TMapInputLeft1,TMapInputRight1,TMapInputLeft2, TMapInputRight2,TInnerKey,TReduceInput1,TReduceInput2,TSelectorInput, TOutput>(IMapDefinition<TOuterKey,TMapInputLeft1,TMapInputRight1, TInnerKey,TReduceInput1>, IMapDefinition<TOuterKey,TMapInputLeft2, TMapInputRight2,TInnerKey,TReduceInput2>, Func<IStreamable<CompoundGroupKey<TOuterKey, TInnerKey>,TReduceInput1>,IStreamable<CompoundGroupKey<TOuterKey, TInnerKey>,TReduceInput2>,IStreamable<CompoundGroupKey<TOuterKey, TInnerKey>,TSelectorInput>>, Expression<Func<GroupSelectorInput<TInnerKey>, TSelectorInput,TOutput>>, OperationalHint)
Two-input reducer. This reducer takes the result of 2 map operators (one can be implicit by using . ) and applies a 2 input stream valued function (reducer) to each partitioned stream pair. Note that the two mapped input stream must have the same mapping type. The result selector allows the reintroduction of the grouping key to the output in case it has been lost in the apply function. Additional parameter allows specifying whether reduce is asymmetric (multicast left side, spray right side)
public static Microsoft.StreamProcessing.IStreamable<TOuterKey,TOutput> Reduce<TOuterKey,TMapInputLeft1,TMapInputRight1,TMapInputLeft2,TMapInputRight2,TInnerKey,TReduceInput1,TReduceInput2,TSelectorInput,TOutput> (this Microsoft.StreamProcessing.IMapDefinition<TOuterKey,TMapInputLeft1,TMapInputRight1,TInnerKey,TReduceInput1> mapDefinitionLeft, Microsoft.StreamProcessing.IMapDefinition<TOuterKey,TMapInputLeft2,TMapInputRight2,TInnerKey,TReduceInput2> mapDefinitionRight, Func<Microsoft.StreamProcessing.IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<TOuterKey,TInnerKey>,TReduceInput1>,Microsoft.StreamProcessing.IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<TOuterKey,TInnerKey>,TReduceInput2>,Microsoft.StreamProcessing.IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<TOuterKey,TInnerKey>,TSelectorInput>> reducer, System.Linq.Expressions.Expression<Func<Microsoft.StreamProcessing.GroupSelectorInput<TInnerKey>,TSelectorInput,TOutput>> resultSelector, Microsoft.StreamProcessing.OperationalHint reduceOptions = Microsoft.StreamProcessing.OperationalHint.None);
static member Reduce : Microsoft.StreamProcessing.IMapDefinition<'OuterKey, 'TMapInputLeft1, 'TMapInputRight1, 'InnerKey, 'TReduceInput1> * Microsoft.StreamProcessing.IMapDefinition<'OuterKey, 'TMapInputLeft2, 'TMapInputRight2, 'InnerKey, 'TReduceInput2> * Func<Microsoft.StreamProcessing.IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<'OuterKey, 'InnerKey>, 'TReduceInput1>, Microsoft.StreamProcessing.IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<'OuterKey, 'InnerKey>, 'TReduceInput2>, Microsoft.StreamProcessing.IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<'OuterKey, 'InnerKey>, 'SelectorInput>> * System.Linq.Expressions.Expression<Func<Microsoft.StreamProcessing.GroupSelectorInput<'InnerKey>, 'SelectorInput, 'Output>> * Microsoft.StreamProcessing.OperationalHint -> Microsoft.StreamProcessing.IStreamable<'OuterKey, 'Output>
<Extension()>
Public Function Reduce(Of TOuterKey, TMapInputLeft1, TMapInputRight1, TMapInputLeft2, TMapInputRight2, TInnerKey, TReduceInput1, TReduceInput2, TSelectorInput, TOutput) (mapDefinitionLeft As IMapDefinition(Of TOuterKey, TMapInputLeft1, TMapInputRight1, TInnerKey, TReduceInput1), mapDefinitionRight As IMapDefinition(Of TOuterKey, TMapInputLeft2, TMapInputRight2, TInnerKey, TReduceInput2), reducer As Func(Of IStreamable(Of CompoundGroupKey(Of TOuterKey, TInnerKey), TReduceInput1), IStreamable(Of CompoundGroupKey(Of TOuterKey, TInnerKey), TReduceInput2), IStreamable(Of CompoundGroupKey(Of TOuterKey, TInnerKey), TSelectorInput)), resultSelector As Expression(Of Func(Of GroupSelectorInput(Of TInnerKey), TSelectorInput, TOutput)), Optional reduceOptions As OperationalHint = Microsoft.StreamProcessing.OperationalHint.None) As IStreamable(Of TOuterKey, TOutput)
Type Parameters
- TOuterKey
- TMapInputLeft1
- TMapInputRight1
- TMapInputLeft2
- TMapInputRight2
- TInnerKey
- TReduceInput1
- TReduceInput2
- TSelectorInput
- TOutput
Parameters
- mapDefinitionLeft
- IMapDefinition<TOuterKey,TMapInputLeft1,TMapInputRight1,TInnerKey,TReduceInput1>
- mapDefinitionRight
- IMapDefinition<TOuterKey,TMapInputLeft2,TMapInputRight2,TInnerKey,TReduceInput2>
- reducer
- Func<IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<TOuterKey,TInnerKey>,TReduceInput1>,IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<TOuterKey,TInnerKey>,TReduceInput2>,IStreamable<Microsoft.StreamProcessing.CompoundGroupKey<TOuterKey,TInnerKey>,TSelectorInput>>
- resultSelector
- Expression<Func<Microsoft.StreamProcessing.GroupSelectorInput<TInnerKey>,TSelectorInput,TOutput>>
- reduceOptions
- OperationalHint