kennknowles commented on a change in pull request #12041:
URL: https://github.com/apache/beam/pull/12041#discussion_r443800518
##########
File path:
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamEnumerableConverter.java
##########
@@ -201,7 +204,9 @@ private static void runCollector(PipelineOptions options,
BeamRelNode node) {
PCollection<Row> resultCollection =
BeamSqlRelUtils.toPCollection(pipeline, node);
resultCollection.apply(ParDo.of(new Collector()));
PipelineResult result = pipeline.run();
- result.waitUntilFinish();
+ if (PipelineResult.State.FAILED.equals(result.waitUntilFinish())) {
+ throw new RuntimeException("Pipeline failed for unknown reason");
Review comment:
Noting that for the DirectRunner, we want `result.waitUntilFinish()` to
always throw an exception when there's a failure. I think it is always a bug if
you get FAILED status without throwing.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]