jnh5y commented on code in PR #24020:
URL: https://github.com/apache/flink/pull/24020#discussion_r1442077875
##########
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:
Any particular reason to assume that there is only one StatementSet being
tested?
--
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]