You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/09/24 10:03:26 UTC

[GitHub] [incubator-kyuubi] pan3793 commented on a diff in pull request #3550: [KYUUBI #3549] Support query id in Flink engine

pan3793 commented on code in PR #3550:
URL: https://github.com/apache/incubator-kyuubi/pull/3550#discussion_r979216218


##########
externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala:
##########
@@ -152,6 +155,9 @@ class ExecuteStatement(
 
   private def runOperation(operation: Operation): Unit = {
     val result = executor.executeOperation(sessionId, operation)
+    if (result.getJobClient.isPresent) {
+      jobId = Some(result.getJobClient.get().getJobID)
+    }

Review Comment:
   There is helper class `FlinkOperation#RichOptional` could simplify this code.



##########
externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala:
##########
@@ -152,6 +155,9 @@ class ExecuteStatement(
 
   private def runOperation(operation: Operation): Unit = {
     val result = executor.executeOperation(sessionId, operation)
+    if (result.getJobClient.isPresent) {
+      jobId = Some(result.getJobClient.get().getJobID)
+    }

Review Comment:
   There is a helper class `FlinkOperation#RichOptional` could simplify this code.



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org