apilloud commented on a change in pull request #12041:
URL: https://github.com/apache/beam/pull/12041#discussion_r443853108



##########
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:
       You may want to file a bug. The behavior before this PR is that an 
exception will be thrown `at most once`, after the PR it is `exactly once`. If 
there are multiple threads waiting on `result.waitUntilFinish()`, not all will 
receive exceptions.




----------------------------------------------------------------
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]


Reply via email to