public class ProjectionPushdownOptimizer
extends java.lang.Object
optimize(Pipeline)
.Constructor and Description |
---|
ProjectionPushdownOptimizer() |
Modifier and Type | Method and Description |
---|---|
static void |
optimize(Pipeline pipeline)
Performs all known projection pushdown optimizations in-place on a Pipeline.
|
public static void optimize(Pipeline pipeline)
A pushdown optimization is possible wherever there is a ProjectionProducer
that
produces a PCollection
that is consumed by one or more PTransforms with an annotated
FieldAccessDescriptor
, where the number of fields consumed is less than the number of
fields produced. The optimizer replaces the ProjectionProducer
with the result of
calling ProjectionProducer.actuateProjectionPushdown(Map)
on that producer with those
PCollections/fields.
Currently only supports pushdown on ProjectionProducer
instances that are applied
directly to PBegin
(https://github.com/apache/beam/issues/21359).