fsk119 commented on code in PR #21717: URL: https://github.com/apache/flink/pull/21717#discussion_r1083995101
########## flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/rest/message/session/ConfigureSessionRequestBody.java: ########## @@ -39,6 +39,10 @@ public class ConfigureSessionRequestBody implements RequestBody { @Nullable private final Long timeout; + public ConfigureSessionRequestBody(String statement) { + this(statement, null); + } + public ConfigureSessionRequestBody( Review Comment: The annotation `JsonCreator` is used when serde the json object. However, the developer uses the creator here to build the object conveniently. Do you mean we should add annotation `JsonCreator` for the constructor `ConfigureSessionRequestBody(@JsonProperty(FIELD_NAME_STATEMENT) String statement, @Nullable @JsonProperty(FIELD_NAME_EXECUTION_TIMEOUT) Long timeout)`? ########## flink-table/flink-sql-client/src/test/resources/sql/set.q: ########## @@ -118,47 +118,61 @@ SELECT hive_add_one(1); Received a total of 1 row !ok -REMOVE JAR '$VAR_UDF_JAR_PATH'; -[INFO] The specified jar is removed from session classloader. -!info +# TODO: support this in the FLINK-30692 +#REMOVE JAR '$VAR_UDF_JAR_PATH'; +#[INFO] The specified jar is removed from session classloader. +#!info -SHOW JARS; -Empty set -!ok +#SHOW JARS; +#Empty set +#!ok + +reset table.resources.download-dir; +[INFO] Execute statement succeed. +!info # list the configured configuration set; -'execution.attached' = 'true' -'execution.savepoint-restore-mode' = 'NO_CLAIM' -'execution.savepoint.ignore-unclaimed-state' = 'false' -'execution.shutdown-on-attached-exit' = 'false' -'execution.target' = 'remote' -'jobmanager.rpc.address' = '$VAR_JOBMANAGER_RPC_ADDRESS' -'k1' = 'v1' -'pipeline.classpaths' = '' -'pipeline.jars' = '' -'rest.port' = '$VAR_REST_PORT' -'sql-client.execution.result-mode' = 'tableau' -'table.exec.legacy-cast-behaviour' = 'DISABLED' -'table.sql-dialect' = 'hive' ++--------------------------------------------+-----------+ +| key | value | ++--------------------------------------------+-----------+ +| execution.attached | true | +| execution.savepoint-restore-mode | NO_CLAIM | +| execution.savepoint.ignore-unclaimed-state | false | +| execution.shutdown-on-attached-exit | false | +| execution.target | remote | +| jobmanager.rpc.address | $VAR_JOBMANAGER_RPC_ADDRESS | +| k1 | v1 | +| pipeline.classpaths | | +| pipeline.jars | | +| rest.port | $VAR_REST_PORT | +| sql-client.execution.result-mode | tableau | +| table.exec.legacy-cast-behaviour | DISABLED | +| table.sql-dialect | hive | ++--------------------------------------------+-----------+ +13 rows in set Review Comment: Thanks for pointing it out! I find I use the wrong API in the ExecutorImpl. I should use `ScheduledExecutorService#scheduleAtFixedRate` rather than `ScheduledExecutorService#schedule`. The latter API only triggers the session once. -- 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