bvarghese1 commented on code in PR #24020:
URL: https://github.com/apache/flink/pull/24020#discussion_r1442091512


##########
flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/test/program/TableTestProgram.java:
##########
@@ -198,6 +198,18 @@ public SqlTestStep getRunSqlTestStep() {
         return (SqlTestStep) sqlSteps.get(0);
     }
 
+    /**
+     * Convenience method to avoid boilerplate code. It assumes only one 
statement set is tested.
+     */
+    public StatementSetTestStep getRunStatementSetTestStep() {
+        List<TestStep> statementSetSteps =
+                runSteps.stream()
+                        .filter(s -> s.getKind() == TestKind.STATEMENT_SET)
+                        .collect(Collectors.toList());
+
+        return (StatementSetTestStep) statementSetSteps.get(0);

Review Comment:
   For tests, as a convenience we can assume there will be only 1 statement set 
which can contain multiple sql statements.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to