Imfuyuwei commented on a change in pull request #12601:
URL: https://github.com/apache/beam/pull/12601#discussion_r471786508



##########
File path: 
sdks/java/testing/tpcds/src/main/java/org/apache/beam/sdk/tpcds/SqlTransformRunner.java
##########
@@ -121,19 +152,26 @@ public static void runUsingSqlTransform(String[] args) 
throws Exception {
             String queryString = QueryReader.readQuery(queryNameArr[i]);
             PCollectionTuple tables = getTables(pipelines[i], csvFormat, 
queryNameArr[i]);
 
-            tables
-                    .apply(
-                            SqlTransform.query(queryString))
-                    .apply(
-                            
MapElements.into(TypeDescriptors.strings()).via((Row row) -> row.toString()))
-                    .apply(TextIO.write()
-                            .to(resultDirectory + "/" + dataSize + "/" + 
pipelines[i].getOptions().getJobName())
-                            .withSuffix(".txt")
-                            .withNumShards(1));
+            try {
+                tables
+                        .apply(
+                                SqlTransform.query(queryString))
+                        .apply(
+                                
MapElements.into(TypeDescriptors.strings()).via((Row row) -> row.toString()))
+                        .apply(TextIO.write()
+                                .to(RESULT_DIRECTORY + "/" + dataSize + "/" + 
pipelines[i].getOptions().getJobName())
+                                .withSuffix(".txt")
+                                .withNumShards(1));
+            } catch (Exception e) {
+                System.out.println(queryNameArr[i] + " failed to execute");

Review comment:
       Replaced




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