private static IProcessBuilder GetBuilder(IEtlContext context, IMemoryAggregationOperation op, ITypeConverter converter) { var builder = ProcessBuilder.Fluent .ReadFrom(TestData.Person(context)); if (converter != null) { builder = builder .ConvertValue(new InPlaceConvertMutator(context) { Columns = new[] { "age", "height" }, TypeConverter = converter, }); } return(builder .Aggregate(new MemoryAggregationMutator(context) { KeyGenerator = row => row.GenerateKey("name"), FixColumns = new() {
private static IProcessBuilder GetBuilder(ITopic topic, IMemoryAggregationOperation op, ITypeConverter converter) { var builder = ProcessBuilder.Fluent .ReadFrom(TestData.PersonSortedByName(topic)); if (converter != null) { builder = builder .ConvertValue(new InPlaceConvertMutator(topic, null) { Columns = new[] { "age", "height" }, TypeConverter = converter, }); } return(builder .AggregateOrdered(new SortedMemoryAggregationMutator(topic, null) { KeyGenerator = row => row.GenerateKey("name"), FixColumns = ColumnCopyConfiguration.StraightCopy("name"), Operation = op, })); }
public MemoryAggregationException(AbstractMemoryAggregationMutator mutator, IMemoryAggregationOperation operation, List <IReadOnlySlimRow> group, Exception innerException) : base(mutator, "error raised during the execution of an in-memory aggregation", innerException) { Data.Add("Operation", operation.GetType().GetFriendlyTypeName()); Data.Add("Group", string.Join("\n", group.Select(x => x.ToDebugString()))); }