HpcLinqQueryable.AssumeRangePartition Method (IQueryable, Expression, TKey, IComparer)
Indicates to LINQ to HPC that the specified set of records was divided into DSC files by using the specified set of range separators, and by associating each DSC file with a range of values for a key that the specified function generated from the records. The specified custom comparison object was used to compare the keys to the range separators.
Namespace: Microsoft.Hpc.Linq
Assembly: Microsoft.Hpc.Linq (in Microsoft.Hpc.Linq.dll)
Usage
'Usage
Dim source As IQueryable(Of TSource)
Dim keySelector As Expression(Of Func(Of TSource, TKey))
Dim rangeSeparators As TKey()
Dim comparer As IComparer(Of TKey)
Dim returnValue As IQueryable(Of TSource)
returnValue = HpcLinqQueryable.AssumeRangePartition(source, keySelector, rangeSeparators, comparer)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function AssumeRangePartition(Of TSource, TKey) ( _
source As IQueryable(Of TSource), _
keySelector As Expression(Of Func(Of TSource, TKey)), _
rangeSeparators As TKey(), _
comparer As IComparer(Of TKey) _
) As IQueryable(Of TSource)
[ExtensionAttribute]
public static IQueryable<TSource> AssumeRangePartition<TSource,TKey> (
IQueryable<TSource> source,
Expression<Func<TSource,TKey>> keySelector,
TKey[] rangeSeparators,
IComparer<TKey> comparer
)
[ExtensionAttribute]
public:
generic<typename TSource, typename TKey>
static IQueryable<TSource>^ AssumeRangePartition (
IQueryable<TSource>^ source,
Expression<Func<TSource, TKey>^>^ keySelector,
array<TKey>^ rangeSeparators,
IComparer<TKey>^ comparer
)
J# supports the use of generic APIs, but not the declaration of new ones.
JScript does not support generic types or methods.
GenericParameters
- TSource
The type of the records in the source parameter.
- TKey
The return type of the function that you specify in the keySelector parameter to generate the key from a record.
Parameters
- source
A System.Linq.IQueryable<TSource> interface for the set of records that you divided into DSC files based on the range matched by a value generated from each record.
- keySelector
A System.Linq.Expressions.Expression(Func(TSource, TKey)) object that specifies a function that generated a key from each record. The range partition operation divides the records into DSC files by using the value of this key.
- rangeSeparators
An array of objects with type that the TKey parameter specifies the range separators that you used to divide the records according to the range that contains the value of the key for the record. This array should be sorted in the same direction that you want the DSC files to be sorted. The number of DSC files in the file set that the range partition operation creates is equal to the length of this array plus one.
- comparer
An IComparer<TKey> interface that you used for comparing the key for a record to the range separators and for sorting the records.
Return Value
The same IQueryable interface that you specified in the source parameter.
Exceptions
| Exception type | Condition |
|---|---|
| ArgumentNullException | The specified source, keySelector, or rangeSeparators parameter is a null reference (Nothing in Visual Basic). |
Remarks
In Visual Basic and C#, you can call this method as an instance method on any object of type IQueryable<TSource>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
This method has at least one parameter of type Expression with a type argument that is one of the Func types. For these parameters, you can pass in a lambda expression and it compiles to an Expression.
Platform Note: This method was introduced in Windows HPC Server 2008 R2 with Service Pack 2 (SP2) and is not supported in previous versions.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012
Target Platforms
Windows XP, Windows Vista, Windows 7, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, with HPC Pack Client Utilities
See Also
Reference
HpcLinqQueryable Class
HpcLinqQueryable Members
Microsoft.Hpc.Linq Namespace
AssumeRangePartition(Generic IQueryable,Generic Expression,K[])
AssumeRangePartition(Generic IQueryable,Generic Expression,Boolean)
AssumeRangePartition(Generic IQueryable,Generic Expression,Generic IComparer,Boolean)
RangePartition(Generic IQueryable,Generic Expression,K[],Generic IComparer)
Build Date:
2013-04-22