/// <inheritdoc cref="ScanShareableAnalyzer{S,M}.AggregationFunctions"/> public override IEnumerable <Column> AggregationFunctions() { Column summarization = Sum(AnalyzersExt.ConditionalSelection(Column, Where) .IsNotNull() .Cast("int")); Column conditional = AnalyzersExt.ConditionalCount(Where); return(new[] { summarization, conditional }); }
/// <inheritdoc cref="ScanShareableAnalyzer{S,M}.AggregationFunctions"/> public override IEnumerable <Column> AggregationFunctions() { Column expression = When(RegexpExtract(Column(Column.GetOrElse(string.Empty)), Regex.ToString(), 0) != Lit(""), 1) .Otherwise(0); Column summation = Sum(AnalyzersExt.ConditionalSelection(expression, Where).Cast("integer")); return(new[] { summation, AnalyzersExt.ConditionalCount(Where) }); }
/// <inheritdoc cref="ScanShareableAnalyzer{S,M}.AggregationFunctions" /> public override IEnumerable <Column> AggregationFunctions() { //https://mathoverflow.net/a/57914 var firstSelection = AnalyzersExt.ConditionalSelection(ColumnA, Where); var secondSelection = AnalyzersExt.ConditionalSelection(ColumnB, Where); var count = Count(firstSelection); var sumX = Sum(firstSelection); var sumY = Sum(secondSelection); var sumXY = Sum(firstSelection * secondSelection); var sumX2 = Sum(firstSelection * firstSelection); var sumY2 = Sum(secondSelection * secondSelection); //double n, double sumX, double sumY, double sumXY, double sumX2, double sumY2 return(new[] { count, sumX, sumY, sumXY, sumX2, sumY2 }); }
public override IEnumerable <Column> AggregationFunctions() { Column selection = AnalyzersExt.ConditionalSelection(Predicate, Where); return(new[] { selection, Count("*") }.AsEnumerable()); }
/// <inheritdoc cref="StandardScanShareableAnalyzer{S}.AggregationFunctions"/> public override IEnumerable <Column> AggregationFunctions() => new[] { Sum(AnalyzersExt.ConditionalSelection(Column, Where)).Cast("double") };
/// <inheritdoc cref="ScanShareableAnalyzer{S,M}.AggregationFunctions"/> public override IEnumerable <Column> AggregationFunctions() { Column summation = Sum(AnalyzersExt.ConditionalSelection(Predicate, Where).Cast("int")); return(new[] { summation, AnalyzersExt.ConditionalCount(Where) }); }
/// <inheritdoc cref="StandardScanShareableAnalyzer{S}.AggregationFunctions"/> public override IEnumerable <Column> AggregationFunctions() { Column col = AnalyzersExt.ConditionalSelection(Expr(Column.GetOrElse(string.Empty)), Where); return(new[] { Struct(Count(col), Avg(col), StddevPop(col)) }); }
/// <inheritdoc cref="ScanShareableAnalyzer{S,M}.AggregationFunctions"/>. public override IEnumerable <Column> AggregationFunctions() => new[] { AnalyzersExt.ConditionalSelection(Column, Where) };