PrimitiveAggregateAsFold

com.choreograph.tyda.rewrite.PrimitiveAggregateAsFold

Converts a PrimitiveAggregate into a fold-like structure consisting of an initial value, a merge function, and a finish function.

This is used to rewrite aggregates over arrays into a fold operation that can be used with query engines like Spark that exposes reduce/aggregate function over arrays.

Attributes

Source
PrimitiveAggregateAsFold.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

final case class Result[T, I, R](initial: ExprNode[I], merge: CompiledExpr2[I, T, I], finish: CompiledExpr[I, R])

Attributes

Source
PrimitiveAggregateAsFold.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def apply[T : Codec, R](onEmpty: ExprNode[R], agg: PrimitiveAggregate[T, R] & SupportedAggregates): Result[T, _, R]

Attributes

Source
PrimitiveAggregateAsFold.scala