com.twitter.summingbird.planner
We can always push all Also nodes all the way to the bottom of the dag MergedProducer(AlsoProducer(t, a), b) == AlsoProducer(t, MergedProducer(a, b))
(a.
a.
Combine flatMaps followed by optionMap into a single operation
(a ++ b).
Identity keyed producer is just a trick to make scala see methods on keyed types, they have no meaning at runtime.
Strip all the names.
Create an ExpressionDag for the given node.
Create an ExpressionDag for the given node. This should be the final tail of the graph. You can apply optimizations on this Dag and then use the Id returned to evaluate it back to an optimized producer
This makes a potentially unsound cast.
This makes a potentially unsound cast. Since this method is only use in converting from an AlsoProducer to a Literal[T, Prod] below, it is not actually dangerous because we always use it in a safe position.
Convert a Producer graph into a Literal in the Dag rewriter This is where the tedious work comes in.