apilloud commented on a change in pull request #15915:
URL: https://github.com/apache/beam/pull/15915#discussion_r746834918
##########
File path:
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamCalcRel.java
##########
@@ -112,11 +119,19 @@
private static final long MILLIS_PER_DAY = 86400000L;
private static final ParameterExpression rowParam =
Expressions.parameter(Row.class, "row");
+ private PTransform<PCollection<BeamCalcRelError>, POutput> errorsTransformer;
+ private static final TupleTag<Row> rows = new TupleTag<Row>() {};
+ private static final TupleTag<BeamCalcRelError> errors = new
TupleTag<BeamCalcRelError>() {};
public BeamCalcRel(RelOptCluster cluster, RelTraitSet traits, RelNode input,
RexProgram program) {
super(cluster, traits, input, program);
}
+ @Override
+ public void withErrorsTransformer(PTransform<PCollection<BeamCalcRelError>,
POutput> ptransform) {
Review comment:
You could also add a default for the new `buildPTransform` that calls
the old one, this would allow you to avoid storing state and also not make a
breaking change. There are other places the pipeline can crash, we'll
eventually want every RelNode to catch and return errors. I'm fine with leaving
it as is, this is an internal API so easy for someone to change again if it
becomes a problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]