openinx commented on a change in pull request #10236: [FLINK-14703][e2e] Port
the Kafka SQL related tests.
URL: https://github.com/apache/flink/pull/10236#discussion_r358569066
##########
File path:
flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/FlinkDistribution.java
##########
@@ -236,6 +237,30 @@ public JobID submitJob(final JobSubmission jobSubmission)
throws IOException {
}
}
+ public void submitSQLJob(SQLJobSubmission job) throws IOException {
+ final List<String> commands = new ArrayList<>();
+
commands.add(bin.resolve("sql-client.sh").toAbsolutePath().toString());
+ if (job.isEmbedded()) {
+ commands.add("embedded");
+ }
+ if (job.getDefaultEnvFile() != null) {
+ commands.add("--defaults");
+ commands.add(job.getDefaultEnvFile());
+ }
+ if (job.getSessionEnvFile() != null) {
+ commands.add("--environment");
+ commands.add(job.getSessionEnvFile());
+ }
+ for (String jar : job.getJars()) {
+ commands.add("--jar");
+ commands.add(jar);
+ }
+ commands.add("--update");
Review comment:
> Is the documentation of the sql client outdated? It doesn't list --update
Not outdated, the --update is used to execute one SQL statement in the
client, such as:
```
./bin/sql-client.sh embedded --jar test.jar -u "select 1"
```
> and embedded does not appear to be an optional argument.
That's true, now it's a necessary argument, let me change this.
----------------------------------------------------------------
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]
With regards,
Apache Git Services