SteNicholas commented on a change in pull request #1891:
URL: https://github.com/apache/incubator-kyuubi/pull/1891#discussion_r805644602
##########
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:
@yaooqinn, according to your points, does this fix in this pull request?
If not, IMO, current implementation is correct.
--
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]