Exemple #1
0
        /// <summary>
        /// Broadcast a dataset to n partitions.
        /// </summary>
        /// <typeparam name="T">The record type of the source</typeparam>
        /// <param name="source">The source dataset to broadcast</param>
        /// <param name="bcnt">The number of copies to broadcast</param>
        /// <returns>The output dataset, each partition of which is a copy of source</returns>
        public static IQueryable <T> BroadCast <T>(this IQueryable <T> source, int bcnt)
        {
            var dummy = source.ApplyPerPartition(x => DryadLinqHelper.ValueZero(x))
                        .HashPartition(x => x, bcnt);

            return(dummy.ApplyPerPartition(source, (x, y) => y, true));
        }
Exemple #2
0
 CheckOrderBy <TSource, TKey>(this IQueryable <TSource> source,
                              Expression <Func <TSource, TKey> > keySelector,
                              IComparer <TKey> comparer,
                              bool isDescending)
 {
     return(source.ApplyPerPartition(x_1 => DryadLinqHelper.CheckSort(x_1, keySelector, comparer, isDescending)));
 }
Exemple #3
0
 CrossProduct <T1, T2, T3>(this IQueryable <T1> source1,
                           IQueryable <T2> source2,
                           Expression <Func <T1, T2, T3> > procFunc)
 {
     return(source1.ApplyPerPartition(source2, (x_1, y_1) => DryadLinqHelper.Cross(x_1, y_1, procFunc), true));
 }