yaooqinn commented on a change in pull request #1891:
URL: https://github.com/apache/incubator-kyuubi/pull/1891#discussion_r805618457
##########
File path:
externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/FlinkSQLOperationManager.scala
##########
@@ -18,22 +18,38 @@
package org.apache.kyuubi.engine.flink.operation
import java.util
+import java.util.Locale
-import scala.collection.JavaConverters.asScalaBufferConverter
+import scala.collection.JavaConverters._
+import org.apache.kyuubi.config.KyuubiConf._
+import org.apache.kyuubi.config.KyuubiConf.OperationModes._
import org.apache.kyuubi.engine.flink.result.Constants
+import org.apache.kyuubi.engine.flink.session.FlinkSessionImpl
import org.apache.kyuubi.operation.{Operation, OperationManager}
import org.apache.kyuubi.session.Session
class FlinkSQLOperationManager extends
OperationManager("FlinkSQLOperationManager") {
+ private lazy val operationModeDefault = getConf.get(OPERATION_PLAN_ONLY)
+
override def newExecuteStatementOperation(
session: Session,
statement: String,
confOverlay: Map[String, String],
runAsync: Boolean,
queryTimeout: Long): Operation = {
- val op = new ExecuteStatement(session, statement, runAsync, queryTimeout)
+ val flinkSession = session.asInstanceOf[FlinkSessionImpl]
+ val mode =
+ flinkSession.sessionContext.getConfigMap.getOrDefault(
+ OPERATION_PLAN_ONLY.key,
+ flinkSession.normalizedConf.getOrElse(OPERATION_PLAN_ONLY.key,
operationModeDefault))
Review comment:
this is a bug, session configs shall be set first in `flinkSession` for
sharing across operations within a session.
We shall override `open` in `FlinkSessionImpl` and call it in
`org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager#openSession`,
which worth a separate PR to fix
--
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]