You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ya...@apache.org on 2022/06/28 12:06:30 UTC

[incubator-kyuubi] branch master updated: [KYUUBI #2952] Remove OperationType from OperationHandle for simplification

This is an automated email from the ASF dual-hosted git repository.

yao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 6c44a7bbd [KYUUBI #2952] Remove OperationType from OperationHandle for simplification
6c44a7bbd is described below

commit 6c44a7bbd26880544e956bb680ce06f90e5a84a4
Author: Kent Yao <ya...@apache.org>
AuthorDate: Tue Jun 28 20:06:20 2022 +0800

    [KYUUBI #2952] Remove OperationType from OperationHandle for simplification
    
    ### _Why are the changes needed?_
    
    The Operation Type is only used for converting `TOperationType` through specific Thrift Operation APIs. So we can TOperationType in these APIs directly, such as, during calling TFrontendService.ExecuteStatement, we can set TOperationType.EXECUTE_STATEMENT at the end. There is no need to add it to OperationType.
    
    This PR removes `OperationType` completely to simply `OperationHandle` which benefits other `kyuubi.frontend.protocols`.
    
    The thrift protocol shall be able to be removed in following PRs.
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #2952 from yaooqinn/opType.
    
    Closes #2952
    
    af00c04a [Kent Yao] address comments
    4e4f4341 [Kent Yao] address comments
    54a2c4ff [Kent Yao] [WIP] Remove Operation Type
    ba08ccaf [Kent Yao] [WIP] Remove Operation Type
    1737176b [Kent Yao] [WIP] Remove Operation Type
    8fe00820 [Kent Yao] [WIP] Remove Operation Type
    f969d73d [Kent Yao] [WIP] Remove Operation Type
    778f8f4f [Kent Yao] [WIP] Remove Operation Type
    54f6573c [Kent Yao] [WIP] Remove Operation Type
    
    Authored-by: Kent Yao <ya...@apache.org>
    Signed-off-by: Kent Yao <ya...@apache.org>
---
 .../engine/flink/operation/ExecuteStatement.scala  |  4 +-
 .../engine/flink/operation/FlinkOperation.scala    |  6 +--
 .../flink/operation/FlinkSQLOperationManager.scala |  4 +-
 .../engine/flink/operation/GetCatalogs.scala       |  4 +-
 .../engine/flink/operation/GetCurrentCatalog.scala |  4 +-
 .../flink/operation/GetCurrentDatabase.scala       |  4 +-
 .../engine/flink/operation/GetFunctions.scala      |  3 +-
 .../kyuubi/engine/flink/operation/GetSchemas.scala |  3 +-
 .../engine/flink/operation/GetTableTypes.scala     |  4 +-
 .../kyuubi/engine/flink/operation/GetTables.scala  |  3 +-
 .../engine/flink/operation/GetTypeInfo.scala       |  4 +-
 .../engine/flink/operation/PlanOnlyStatement.scala |  4 +-
 .../engine/flink/operation/SetCurrentCatalog.scala |  3 +-
 .../flink/operation/SetCurrentDatabase.scala       |  3 +-
 .../flink/operation/FlinkOperationSuite.scala      |  4 +-
 .../engine/hive/operation/ExecuteStatement.scala   |  3 +-
 .../kyuubi/engine/hive/operation/GetCatalogs.scala |  3 +-
 .../kyuubi/engine/hive/operation/GetColumns.scala  |  3 +-
 .../engine/hive/operation/GetCrossReference.scala  |  3 +-
 .../engine/hive/operation/GetCurrentCatalog.scala  |  4 +-
 .../engine/hive/operation/GetCurrentDatabase.scala |  4 +-
 .../engine/hive/operation/GetFunctions.scala       |  3 +-
 .../engine/hive/operation/GetPrimaryKeys.scala     |  4 +-
 .../kyuubi/engine/hive/operation/GetSchemas.scala  |  3 +-
 .../engine/hive/operation/GetTableTypes.scala      |  4 +-
 .../kyuubi/engine/hive/operation/GetTables.scala   |  3 +-
 .../kyuubi/engine/hive/operation/GetTypeInfo.scala |  3 +-
 .../engine/hive/operation/HiveOperation.scala      |  4 +-
 .../engine/hive/operation/SetCurrentCatalog.scala  |  3 +-
 .../engine/hive/operation/SetCurrentDatabase.scala |  3 +-
 .../engine/jdbc/operation/ExecuteStatement.scala   |  6 +--
 .../engine/jdbc/operation/JdbcOperation.scala      |  4 +-
 .../jdbc/operation/JdbcOperationManager.scala      |  5 +-
 .../engine/spark/operation/ExecuteScala.scala      |  4 +-
 .../engine/spark/operation/ExecuteStatement.scala  |  4 +-
 .../engine/spark/operation/GetCatalogs.scala       |  5 +-
 .../kyuubi/engine/spark/operation/GetColumns.scala |  4 +-
 .../engine/spark/operation/GetCurrentCatalog.scala |  5 +-
 .../spark/operation/GetCurrentDatabase.scala       |  5 +-
 .../engine/spark/operation/GetFunctions.scala      |  4 +-
 .../kyuubi/engine/spark/operation/GetSchemas.scala |  4 +-
 .../engine/spark/operation/GetTableTypes.scala     |  4 +-
 .../kyuubi/engine/spark/operation/GetTables.scala  |  4 +-
 .../engine/spark/operation/GetTypeInfo.scala       |  5 +-
 .../engine/spark/operation/PlanOnlyStatement.scala |  4 +-
 .../engine/spark/operation/SetCurrentCatalog.scala |  4 +-
 .../spark/operation/SetCurrentDatabase.scala       |  3 +-
 .../engine/spark/operation/SparkOperation.scala    |  5 +-
 .../spark/operation/SparkOperationSuite.scala      |  3 +-
 .../engine/trino/operation/ExecuteStatement.scala  |  4 +-
 .../engine/trino/operation/GetCatalogs.scala       |  5 +-
 .../kyuubi/engine/trino/operation/GetColumns.scala |  4 +-
 .../engine/trino/operation/GetCurrentCatalog.scala |  4 +-
 .../trino/operation/GetCurrentDatabase.scala       |  4 +-
 .../kyuubi/engine/trino/operation/GetSchemas.scala |  7 ++-
 .../engine/trino/operation/GetTableTypes.scala     |  4 +-
 .../kyuubi/engine/trino/operation/GetTables.scala  |  4 +-
 .../engine/trino/operation/GetTypeInfo.scala       |  4 +-
 .../engine/trino/operation/SetCurrentCatalog.scala |  3 +-
 .../trino/operation/SetCurrentDatabase.scala       |  3 +-
 .../engine/trino/operation/TrinoOperation.scala    |  4 +-
 .../trino/operation/TrinoOperationSuite.scala      |  3 +-
 .../kyuubi/operation/AbstractOperation.scala       |  8 +--
 .../apache/kyuubi/operation/OperationHandle.scala  | 34 +++----------
 .../apache/kyuubi/operation/OperationType.scala    | 59 ----------------------
 .../apache/kyuubi/service/TFrontendService.scala   | 40 +++++++++++----
 .../apache/kyuubi/operation/NoopOperation.scala    |  7 ++-
 .../kyuubi/operation/NoopOperationManager.scala    | 29 +++++------
 .../kyuubi/operation/OperationHandleSuite.scala    |  9 ++--
 .../kyuubi/operation/OperationTypeSuite.scala      | 53 -------------------
 .../kyuubi/operation/log/OperationLogSuite.scala   |  6 +--
 .../kyuubi/service/TFrontendServiceSuite.scala     | 23 +++++----
 .../kyuubi/operation/BatchJobSubmission.scala      |  2 +-
 .../apache/kyuubi/operation/ExecuteStatement.scala |  2 +-
 .../org/apache/kyuubi/operation/GetCatalogs.scala  |  2 +-
 .../org/apache/kyuubi/operation/GetColumns.scala   |  2 +-
 .../kyuubi/operation/GetCrossReference.scala       |  2 +-
 .../org/apache/kyuubi/operation/GetFunctions.scala |  2 +-
 .../apache/kyuubi/operation/GetPrimaryKeys.scala   |  2 +-
 .../org/apache/kyuubi/operation/GetSchemas.scala   |  2 +-
 .../apache/kyuubi/operation/GetTableTypes.scala    |  3 +-
 .../org/apache/kyuubi/operation/GetTables.scala    |  2 +-
 .../org/apache/kyuubi/operation/GetTypeInfo.scala  |  2 +-
 .../apache/kyuubi/operation/KyuubiOperation.scala  | 19 +++----
 .../org/apache/kyuubi/operation/LaunchEngine.scala |  2 +-
 .../server/api/v1/OperationsResourceSuite.scala    | 34 ++++++-------
 .../server/api/v1/SessionsResourceSuite.scala      | 18 +++----
 87 files changed, 209 insertions(+), 397 deletions(-)

diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
index 6af07dff4..e43855758 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
@@ -39,7 +39,7 @@ import org.apache.flink.types.Row
 import org.apache.kyuubi.{KyuubiSQLException, Logging}
 import org.apache.kyuubi.engine.flink.result.ResultSet
 import org.apache.kyuubi.engine.flink.schema.RowSet.toHiveString
-import org.apache.kyuubi.operation.{OperationState, OperationType}
+import org.apache.kyuubi.operation.OperationState
 import org.apache.kyuubi.operation.log.OperationLog
 import org.apache.kyuubi.session.Session
 import org.apache.kyuubi.util.RowSetUtils
@@ -50,7 +50,7 @@ class ExecuteStatement(
     override val shouldRunAsync: Boolean,
     queryTimeout: Long,
     resultMaxRows: Int)
-  extends FlinkOperation(OperationType.EXECUTE_STATEMENT, session) with Logging {
+  extends FlinkOperation(session) with Logging {
 
   private val operationLog: OperationLog =
     OperationLog.createOperationLog(session, getHandle)
diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/FlinkOperation.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/FlinkOperation.scala
index 901ae8a91..684e48471 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/FlinkOperation.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/FlinkOperation.scala
@@ -31,14 +31,10 @@ import org.apache.kyuubi.engine.flink.schema.RowSet
 import org.apache.kyuubi.engine.flink.session.FlinkSessionImpl
 import org.apache.kyuubi.operation.{AbstractOperation, OperationState}
 import org.apache.kyuubi.operation.FetchOrientation.{FETCH_FIRST, FETCH_NEXT, FETCH_PRIOR, FetchOrientation}
-import org.apache.kyuubi.operation.OperationType.OperationType
 import org.apache.kyuubi.operation.log.OperationLog
 import org.apache.kyuubi.session.Session
 
-abstract class FlinkOperation(
-    opType: OperationType,
-    session: Session)
-  extends AbstractOperation(opType, session) {
+abstract class FlinkOperation(session: Session) extends AbstractOperation(session) {
 
   protected val sessionContext: SessionContext = {
     session.asInstanceOf[FlinkSessionImpl].sessionContext
diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/FlinkSQLOperationManager.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/FlinkSQLOperationManager.scala
index 056e7844f..9584e66b3 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/FlinkSQLOperationManager.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/FlinkSQLOperationManager.scala
@@ -27,7 +27,7 @@ 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, OperationType}
+import org.apache.kyuubi.operation.{Operation, OperationManager}
 import org.apache.kyuubi.session.Session
 
 class FlinkSQLOperationManager extends OperationManager("FlinkSQLOperationManager") {
@@ -144,7 +144,7 @@ class FlinkSQLOperationManager extends OperationManager("FlinkSQLOperationManage
       tableName: String,
       columnName: String): Operation = {
     throw new UnsupportedOperationException(
-      s"Unsupported Operation type ${OperationType.GET_COLUMNS}. You can execute " +
+      "Unsupported Operation type GetColumns. You can execute " +
         "DESCRIBE statement instead to get column infos.")
   }
 
diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetCatalogs.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetCatalogs.scala
index a68f6fd24..11dd760e4 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetCatalogs.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetCatalogs.scala
@@ -18,12 +18,10 @@
 package org.apache.kyuubi.engine.flink.operation
 
 import org.apache.kyuubi.engine.flink.result.ResultSetUtil
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant.TABLE_CAT
 import org.apache.kyuubi.session.Session
 
-class GetCatalogs(session: Session)
-  extends FlinkOperation(OperationType.GET_CATALOGS, session) {
+class GetCatalogs(session: Session) extends FlinkOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetCurrentCatalog.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetCurrentCatalog.scala
index 2ddb06361..988072e8d 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetCurrentCatalog.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetCurrentCatalog.scala
@@ -18,12 +18,10 @@
 package org.apache.kyuubi.engine.flink.operation
 
 import org.apache.kyuubi.engine.flink.result.ResultSetUtil
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant.TABLE_CAT
 import org.apache.kyuubi.session.Session
 
-class GetCurrentCatalog(session: Session)
-  extends FlinkOperation(OperationType.EXECUTE_STATEMENT, session) {
+class GetCurrentCatalog(session: Session) extends FlinkOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetCurrentDatabase.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetCurrentDatabase.scala
index 1e392511e..8315a18d3 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetCurrentDatabase.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetCurrentDatabase.scala
@@ -18,12 +18,10 @@
 package org.apache.kyuubi.engine.flink.operation
 
 import org.apache.kyuubi.engine.flink.result.ResultSetUtil
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant.TABLE_SCHEM
 import org.apache.kyuubi.session.Session
 
-class GetCurrentDatabase(session: Session)
-  extends FlinkOperation(OperationType.EXECUTE_STATEMENT, session) {
+class GetCurrentDatabase(session: Session) extends FlinkOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetFunctions.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetFunctions.scala
index 356b1165c..ab870ab79 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetFunctions.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetFunctions.scala
@@ -28,7 +28,6 @@ import org.apache.flink.types.Row
 
 import org.apache.kyuubi.engine.flink.result.ResultSet
 import org.apache.kyuubi.engine.flink.util.StringUtils.filterPattern
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant._
 import org.apache.kyuubi.session.Session
 
@@ -37,7 +36,7 @@ class GetFunctions(
     catalogName: String,
     schemaName: String,
     functionName: String)
-  extends FlinkOperation(OperationType.GET_FUNCTIONS, session) {
+  extends FlinkOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetSchemas.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetSchemas.scala
index 6699faf4b..6715b2320 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetSchemas.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetSchemas.scala
@@ -26,12 +26,11 @@ import org.apache.flink.types.Row
 
 import org.apache.kyuubi.engine.flink.result.ResultSet
 import org.apache.kyuubi.engine.flink.util.StringUtils.filterPattern
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant._
 import org.apache.kyuubi.session.Session
 
 class GetSchemas(session: Session, catalogName: String, schema: String)
-  extends FlinkOperation(OperationType.GET_SCHEMAS, session) {
+  extends FlinkOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetTableTypes.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetTableTypes.scala
index b1712becb..aaeffc7e4 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetTableTypes.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetTableTypes.scala
@@ -18,12 +18,10 @@
 package org.apache.kyuubi.engine.flink.operation
 
 import org.apache.kyuubi.engine.flink.result.{Constants, ResultSetUtil}
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant.TABLE_TYPE
 import org.apache.kyuubi.session.Session
 
-class GetTableTypes(session: Session)
-  extends FlinkOperation(OperationType.GET_TABLE_TYPES, session) {
+class GetTableTypes(session: Session) extends FlinkOperation(session) {
 
   override protected def runInternal(): Unit = {
     val tableTypes = Constants.SUPPORTED_TABLE_TYPES.toList
diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetTables.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetTables.scala
index 250a3c0da..0e9affd2a 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetTables.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetTables.scala
@@ -24,7 +24,6 @@ import org.apache.commons.lang3.StringUtils
 import org.apache.flink.table.catalog.ObjectIdentifier
 
 import org.apache.kyuubi.engine.flink.result.{Constants, ResultSetUtil}
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class GetTables(
@@ -33,7 +32,7 @@ class GetTables(
     schema: String,
     tableName: String,
     tableTypes: Set[String])
-  extends FlinkOperation(OperationType.GET_TABLES, session) {
+  extends FlinkOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetTypeInfo.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetTypeInfo.scala
index 4748c648e..236666e95 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetTypeInfo.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/GetTypeInfo.scala
@@ -26,12 +26,10 @@ import org.apache.flink.table.types.logical.LogicalTypeRoot
 import org.apache.flink.types.Row
 
 import org.apache.kyuubi.engine.flink.result.ResultSet
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant._
 import org.apache.kyuubi.session.Session
 
-class GetTypeInfo(session: Session)
-  extends FlinkOperation(OperationType.GET_TYPE_INFO, session) {
+class GetTypeInfo(session: Session) extends FlinkOperation(session) {
 
   private def isNumericType(javaType: Int): Boolean = {
     javaType == TINYINT || javaType == SMALLINT || javaType == INTEGER || javaType == BIGINT ||
diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/PlanOnlyStatement.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/PlanOnlyStatement.scala
index ba96c8754..73cd49f47 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/PlanOnlyStatement.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/PlanOnlyStatement.scala
@@ -23,7 +23,6 @@ import org.apache.flink.table.operations.command._
 import org.apache.kyuubi.KyuubiSQLException
 import org.apache.kyuubi.config.KyuubiConf.OperationModes._
 import org.apache.kyuubi.engine.flink.result.ResultSetUtil
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.operation.log.OperationLog
 import org.apache.kyuubi.session.Session
 
@@ -33,8 +32,7 @@ import org.apache.kyuubi.session.Session
 class PlanOnlyStatement(
     session: Session,
     override val statement: String,
-    mode: OperationMode)
-  extends FlinkOperation(OperationType.EXECUTE_STATEMENT, session) {
+    mode: OperationMode) extends FlinkOperation(session) {
 
   private val operationLog: OperationLog = OperationLog.createOperationLog(session, getHandle)
   private val lineSeparator: String = System.lineSeparator()
diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/SetCurrentCatalog.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/SetCurrentCatalog.scala
index 6090d5040..489cc6384 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/SetCurrentCatalog.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/SetCurrentCatalog.scala
@@ -17,11 +17,10 @@
 
 package org.apache.kyuubi.engine.flink.operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class SetCurrentCatalog(session: Session, catalog: String)
-  extends FlinkOperation(OperationType.EXECUTE_STATEMENT, session) {
+  extends FlinkOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/SetCurrentDatabase.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/SetCurrentDatabase.scala
index 633a11974..0d3598405 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/SetCurrentDatabase.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/SetCurrentDatabase.scala
@@ -17,11 +17,10 @@
 
 package org.apache.kyuubi.engine.flink.operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class SetCurrentDatabase(session: Session, database: String)
-  extends FlinkOperation(OperationType.EXECUTE_STATEMENT, session) {
+  extends FlinkOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-flink-sql-engine/src/test/scala/org/apache/kyuubi/engine/flink/operation/FlinkOperationSuite.scala b/externals/kyuubi-flink-sql-engine/src/test/scala/org/apache/kyuubi/engine/flink/operation/FlinkOperationSuite.scala
index 2ade23b60..4c716621e 100644
--- a/externals/kyuubi-flink-sql-engine/src/test/scala/org/apache/kyuubi/engine/flink/operation/FlinkOperationSuite.scala
+++ b/externals/kyuubi-flink-sql-engine/src/test/scala/org/apache/kyuubi/engine/flink/operation/FlinkOperationSuite.scala
@@ -33,7 +33,7 @@ import org.apache.kyuubi.config.KyuubiConf.OperationModes.NONE
 import org.apache.kyuubi.engine.flink.WithFlinkSQLEngine
 import org.apache.kyuubi.engine.flink.result.Constants
 import org.apache.kyuubi.engine.flink.util.TestUserClassLoaderJar
-import org.apache.kyuubi.operation.{HiveJDBCTestHelper, OperationType}
+import org.apache.kyuubi.operation.HiveJDBCTestHelper
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant._
 import org.apache.kyuubi.service.ServiceState._
 
@@ -73,7 +73,7 @@ class FlinkOperationSuite extends WithFlinkSQLEngine with HiveJDBCTestHelper {
         null,
         null,
         null)).getMessage
-      assert(exceptionMsg.contains(s"Unsupported Operation type ${OperationType.GET_COLUMNS}."))
+      assert(exceptionMsg.contains(s"Unsupported Operation type GetColumns"))
     }
   }
 
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/ExecuteStatement.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/ExecuteStatement.scala
index dc9d82c20..1e8355821 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/ExecuteStatement.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/ExecuteStatement.scala
@@ -23,7 +23,6 @@ import org.apache.hive.service.cli.operation.Operation
 
 import org.apache.kyuubi.engine.hive.events.HiveOperationEvent
 import org.apache.kyuubi.events.EventBus
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class ExecuteStatement(
@@ -32,7 +31,7 @@ class ExecuteStatement(
     confOverlay: Map[String, String],
     runAsync: Boolean,
     queryTimeout: Long)
-  extends HiveOperation(OperationType.EXECUTE_STATEMENT, session) {
+  extends HiveOperation(session) {
 
   override val internalHiveOperation: Operation = {
     delegatedOperationManager.newExecuteStatementOperation(
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCatalogs.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCatalogs.scala
index 8dad3fbf2..c39f01790 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCatalogs.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCatalogs.scala
@@ -19,11 +19,10 @@ package org.apache.kyuubi.engine.hive.operation
 
 import org.apache.hive.service.cli.operation.Operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class GetCatalogs(session: Session)
-  extends HiveOperation(OperationType.GET_CATALOGS, session) {
+  extends HiveOperation(session) {
 
   override val internalHiveOperation: Operation =
     delegatedOperationManager.newGetCatalogsOperation(hive)
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetColumns.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetColumns.scala
index 2e4bb7895..e55bc4413 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetColumns.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetColumns.scala
@@ -19,7 +19,6 @@ package org.apache.kyuubi.engine.hive.operation
 
 import org.apache.hive.service.cli.operation.Operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class GetColumns(
@@ -28,7 +27,7 @@ class GetColumns(
     schemaName: String,
     tableName: String,
     columnName: String)
-  extends HiveOperation(OperationType.GET_COLUMNS, session) {
+  extends HiveOperation(session) {
 
   override val internalHiveOperation: Operation =
     delegatedOperationManager.newGetColumnsOperation(
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCrossReference.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCrossReference.scala
index 22009e01d..2af52dc4d 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCrossReference.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCrossReference.scala
@@ -19,7 +19,6 @@ package org.apache.kyuubi.engine.hive.operation
 
 import org.apache.hive.service.cli.operation.Operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class GetCrossReference(
@@ -30,7 +29,7 @@ class GetCrossReference(
     foreignCatalog: String,
     foreignSchema: String,
     foreignTable: String)
-  extends HiveOperation(OperationType.GET_FUNCTIONS, session) {
+  extends HiveOperation(session) {
 
   override val internalHiveOperation: Operation =
     delegatedOperationManager.newGetCrossReferenceOperation(
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCurrentCatalog.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCurrentCatalog.scala
index ee6d44df0..bfb55ef9a 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCurrentCatalog.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCurrentCatalog.scala
@@ -21,11 +21,9 @@ import scala.collection.JavaConverters._
 
 import org.apache.hive.service.cli.operation.Operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
-class GetCurrentCatalog(session: Session)
-  extends HiveOperation(OperationType.EXECUTE_STATEMENT, session) {
+class GetCurrentCatalog(session: Session) extends HiveOperation(session) {
   // Hive does not support catalog
   override val internalHiveOperation: Operation =
     delegatedOperationManager.newExecuteStatementOperation(
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCurrentDatabase.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCurrentDatabase.scala
index 3bdbffa15..2288520a1 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCurrentDatabase.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetCurrentDatabase.scala
@@ -21,11 +21,9 @@ import scala.collection.JavaConverters._
 
 import org.apache.hive.service.cli.operation.Operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
-class GetCurrentDatabase(session: Session)
-  extends HiveOperation(OperationType.EXECUTE_STATEMENT, session) {
+class GetCurrentDatabase(session: Session) extends HiveOperation(session) {
 
   override val internalHiveOperation: Operation =
     delegatedOperationManager.newExecuteStatementOperation(
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetFunctions.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetFunctions.scala
index 5191b1420..27413cf04 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetFunctions.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetFunctions.scala
@@ -19,11 +19,10 @@ package org.apache.kyuubi.engine.hive.operation
 
 import org.apache.hive.service.cli.operation.Operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class GetFunctions(session: Session, catalogName: String, schemaName: String, functionName: String)
-  extends HiveOperation(OperationType.GET_FUNCTIONS, session) {
+  extends HiveOperation(session) {
 
   override val internalHiveOperation: Operation =
     delegatedOperationManager.newGetFunctionsOperation(hive, catalogName, schemaName, functionName)
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetPrimaryKeys.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetPrimaryKeys.scala
index 7b030e4b6..76d75cfed 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetPrimaryKeys.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetPrimaryKeys.scala
@@ -19,15 +19,13 @@ package org.apache.kyuubi.engine.hive.operation
 
 import org.apache.hive.service.cli.operation.Operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class GetPrimaryKeys(
     session: Session,
     catalogName: String,
     schemaName: String,
-    tableName: String)
-  extends HiveOperation(OperationType.GET_FUNCTIONS, session) {
+    tableName: String) extends HiveOperation(session) {
 
   override val internalHiveOperation: Operation =
     delegatedOperationManager.newGetPrimaryKeysOperation(
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetSchemas.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetSchemas.scala
index 3e7e1f674..73b8ff330 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetSchemas.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetSchemas.scala
@@ -19,11 +19,10 @@ package org.apache.kyuubi.engine.hive.operation
 
 import org.apache.hive.service.cli.operation.Operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class GetSchemas(session: Session, catalogName: String, schemaName: String)
-  extends HiveOperation(OperationType.GET_SCHEMAS, session) {
+  extends HiveOperation(session) {
 
   override val internalHiveOperation: Operation =
     delegatedOperationManager.newGetSchemasOperation(hive, catalogName, schemaName)
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetTableTypes.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetTableTypes.scala
index 70469883c..b00d2c780 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetTableTypes.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetTableTypes.scala
@@ -19,11 +19,9 @@ package org.apache.kyuubi.engine.hive.operation
 
 import org.apache.hive.service.cli.operation.Operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
-class GetTableTypes(session: Session)
-  extends HiveOperation(OperationType.GET_TABLE_TYPES, session) {
+class GetTableTypes(session: Session) extends HiveOperation(session) {
 
   override val internalHiveOperation: Operation =
     delegatedOperationManager.newGetTableTypesOperation(hive)
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetTables.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetTables.scala
index cc6b7a52d..b8b2b5897 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetTables.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetTables.scala
@@ -21,7 +21,6 @@ import java.util.List
 
 import org.apache.hive.service.cli.operation.Operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class GetTables(
@@ -30,7 +29,7 @@ class GetTables(
     schemaName: String,
     tableName: String,
     tableTypes: List[String])
-  extends HiveOperation(OperationType.GET_TABLES, session) {
+  extends HiveOperation(session) {
 
   override val internalHiveOperation: Operation =
     delegatedOperationManager.newGetTablesOperation(
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetTypeInfo.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetTypeInfo.scala
index 23fe81c4a..53f363bf2 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetTypeInfo.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/GetTypeInfo.scala
@@ -18,10 +18,9 @@ package org.apache.kyuubi.engine.hive.operation
 
 import org.apache.hive.service.cli.operation.Operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
-class GetTypeInfo(session: Session) extends HiveOperation(OperationType.GET_TYPE_INFO, session) {
+class GetTypeInfo(session: Session) extends HiveOperation(session) {
 
   override val internalHiveOperation: Operation =
     delegatedOperationManager.newGetTypeInfoOperation(hive)
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/HiveOperation.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/HiveOperation.scala
index 7a92904b5..5747c7d98 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/HiveOperation.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/HiveOperation.scala
@@ -27,11 +27,9 @@ import org.apache.kyuubi.KyuubiSQLException
 import org.apache.kyuubi.engine.hive.session.HiveSessionImpl
 import org.apache.kyuubi.operation.{AbstractOperation, FetchOrientation, OperationState, OperationStatus}
 import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation
-import org.apache.kyuubi.operation.OperationType.OperationType
 import org.apache.kyuubi.session.Session
 
-abstract class HiveOperation(opType: OperationType, session: Session)
-  extends AbstractOperation(opType, session) {
+abstract class HiveOperation(session: Session) extends AbstractOperation(session) {
 
   protected val hive: HiveSession = session.asInstanceOf[HiveSessionImpl].hive
 
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/SetCurrentCatalog.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/SetCurrentCatalog.scala
index 24340fb2c..14bbc5b03 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/SetCurrentCatalog.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/SetCurrentCatalog.scala
@@ -21,11 +21,10 @@ import scala.collection.JavaConverters._
 
 import org.apache.hive.service.cli.operation.Operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class SetCurrentCatalog(session: Session, catalog: String)
-  extends HiveOperation(OperationType.EXECUTE_STATEMENT, session) {
+  extends HiveOperation(session) {
   // Hive does not support catalog
   override val internalHiveOperation: Operation =
     delegatedOperationManager.newExecuteStatementOperation(
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/SetCurrentDatabase.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/SetCurrentDatabase.scala
index c23127d38..19edcee32 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/SetCurrentDatabase.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/operation/SetCurrentDatabase.scala
@@ -21,11 +21,10 @@ import scala.collection.JavaConverters._
 
 import org.apache.hive.service.cli.operation.Operation
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class SetCurrentDatabase(session: Session, database: String)
-  extends HiveOperation(OperationType.EXECUTE_STATEMENT, session) {
+  extends HiveOperation(session) {
 
   override val internalHiveOperation: Operation =
     delegatedOperationManager.newExecuteStatementOperation(
diff --git a/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/ExecuteStatement.scala b/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/ExecuteStatement.scala
index 7574856cd..78f238e26 100644
--- a/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/ExecuteStatement.scala
+++ b/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/ExecuteStatement.scala
@@ -22,18 +22,16 @@ import org.apache.kyuubi.Logging
 import org.apache.kyuubi.engine.jdbc.schema.{Column, Row, Schema}
 import org.apache.kyuubi.engine.jdbc.session.JdbcSessionImpl
 import org.apache.kyuubi.engine.jdbc.util.ResultSetWrapper
-import org.apache.kyuubi.operation.{ArrayFetchIterator, IterableFetchIterator, OperationState, OperationType}
-import org.apache.kyuubi.operation.OperationType.OperationType
+import org.apache.kyuubi.operation.{ArrayFetchIterator, IterableFetchIterator, OperationState}
 import org.apache.kyuubi.session.Session
 
 class ExecuteStatement(
-    opType: OperationType = OperationType.EXECUTE_STATEMENT,
     session: Session,
     override val statement: String,
     override val shouldRunAsync: Boolean,
     queryTimeout: Long,
     incrementalCollect: Boolean)
-  extends JdbcOperation(opType, session) with Logging {
+  extends JdbcOperation(session) with Logging {
 
   override protected def runInternal(): Unit = {
     addTimeoutMonitor(queryTimeout)
diff --git a/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperation.scala b/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperation.scala
index 48859524d..0382b4348 100644
--- a/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperation.scala
+++ b/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperation.scala
@@ -24,11 +24,9 @@ import org.apache.kyuubi.engine.jdbc.dialect.{JdbcDialect, JdbcDialects}
 import org.apache.kyuubi.engine.jdbc.schema.{Row, Schema}
 import org.apache.kyuubi.operation.{AbstractOperation, FetchIterator, OperationState}
 import org.apache.kyuubi.operation.FetchOrientation.{FETCH_FIRST, FETCH_NEXT, FETCH_PRIOR, FetchOrientation}
-import org.apache.kyuubi.operation.OperationType.OperationType
 import org.apache.kyuubi.session.Session
 
-abstract class JdbcOperation(opType: OperationType, session: Session)
-  extends AbstractOperation(opType, session) {
+abstract class JdbcOperation(session: Session) extends AbstractOperation(session) {
 
   protected var schema: Schema = _
 
diff --git a/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperationManager.scala b/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperationManager.scala
index cbc18a245..1f31735b7 100644
--- a/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperationManager.scala
+++ b/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperationManager.scala
@@ -24,7 +24,7 @@ import org.apache.kyuubi.config.KyuubiConf.OPERATION_INCREMENTAL_COLLECT
 import org.apache.kyuubi.engine.jdbc.dialect.{JdbcDialect, JdbcDialects}
 import org.apache.kyuubi.engine.jdbc.session.JdbcSessionImpl
 import org.apache.kyuubi.engine.jdbc.util.SupportServiceLoader
-import org.apache.kyuubi.operation.{Operation, OperationManager, OperationType}
+import org.apache.kyuubi.operation.{Operation, OperationManager}
 import org.apache.kyuubi.session.Session
 
 class JdbcOperationManager(conf: KyuubiConf) extends OperationManager("JdbcOperationManager")
@@ -46,7 +46,6 @@ class JdbcOperationManager(conf: KyuubiConf) extends OperationManager("JdbcOpera
       session.sessionManager.getConf.get(OPERATION_INCREMENTAL_COLLECT))
     val executeStatement =
       new ExecuteStatement(
-        OperationType.EXECUTE_STATEMENT,
         session,
         statement,
         runAsync,
@@ -81,7 +80,7 @@ class JdbcOperationManager(conf: KyuubiConf) extends OperationManager("JdbcOpera
       tableTypes: util.List[String]): Operation = {
     val query = dialect.getTablesQuery(catalogName, schemaName, tableName, tableTypes)
     val executeStatement =
-      new ExecuteStatement(OperationType.GET_TABLES, session, query, false, 0L, true)
+      new ExecuteStatement(session, query, false, 0L, true)
     addOperation(executeStatement)
   }
 
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteScala.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteScala.scala
index df3da5c43..a67f7295e 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteScala.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteScala.scala
@@ -24,7 +24,7 @@ import org.apache.spark.sql.types.StructType
 
 import org.apache.kyuubi.KyuubiSQLException
 import org.apache.kyuubi.engine.spark.repl.KyuubiSparkILoop
-import org.apache.kyuubi.operation.{ArrayFetchIterator, OperationType}
+import org.apache.kyuubi.operation.ArrayFetchIterator
 import org.apache.kyuubi.operation.log.OperationLog
 import org.apache.kyuubi.session.Session
 
@@ -43,7 +43,7 @@ class ExecuteScala(
     session: Session,
     repl: KyuubiSparkILoop,
     override val statement: String)
-  extends SparkOperation(OperationType.EXECUTE_STATEMENT, session) {
+  extends SparkOperation(session) {
 
   private val operationLog: OperationLog = OperationLog.createOperationLog(session, getHandle)
   override def getOperationLog: Option[OperationLog] = Option(operationLog)
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteStatement.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteStatement.scala
index 1040a7e27..0b0e438f3 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteStatement.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteStatement.scala
@@ -31,7 +31,7 @@ import org.apache.kyuubi.config.KyuubiConf.{OPERATION_RESULT_MAX_ROWS, OPERATION
 import org.apache.kyuubi.engine.spark.KyuubiSparkUtil._
 import org.apache.kyuubi.engine.spark.events.SparkOperationEvent
 import org.apache.kyuubi.events.EventBus
-import org.apache.kyuubi.operation.{ArrayFetchIterator, IterableFetchIterator, OperationState, OperationStatus, OperationType}
+import org.apache.kyuubi.operation.{ArrayFetchIterator, IterableFetchIterator, OperationState, OperationStatus}
 import org.apache.kyuubi.operation.OperationState.OperationState
 import org.apache.kyuubi.operation.log.OperationLog
 import org.apache.kyuubi.session.Session
@@ -42,7 +42,7 @@ class ExecuteStatement(
     override val shouldRunAsync: Boolean,
     queryTimeout: Long,
     incrementalCollect: Boolean)
-  extends SparkOperation(OperationType.EXECUTE_STATEMENT, session) with Logging {
+  extends SparkOperation(session) with Logging {
 
   private val operationLog: OperationLog = OperationLog.createOperationLog(session, getHandle)
   override def getOperationLog: Option[OperationLog] = Option(operationLog)
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetCatalogs.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetCatalogs.scala
index 9356db6d7..6d818e53e 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetCatalogs.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetCatalogs.scala
@@ -20,12 +20,11 @@ package org.apache.kyuubi.engine.spark.operation
 import org.apache.spark.sql.types.StructType
 
 import org.apache.kyuubi.engine.spark.shim.SparkCatalogShim
-import org.apache.kyuubi.operation.{IterableFetchIterator, OperationType}
+import org.apache.kyuubi.operation.IterableFetchIterator
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant.TABLE_CAT
 import org.apache.kyuubi.session.Session
 
-class GetCatalogs(session: Session)
-  extends SparkOperation(OperationType.GET_CATALOGS, session) {
+class GetCatalogs(session: Session) extends SparkOperation(session) {
 
   override protected def resultSchema: StructType = {
     new StructType()
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetColumns.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetColumns.scala
index debe5c0b3..e78516981 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetColumns.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetColumns.scala
@@ -20,7 +20,7 @@ package org.apache.kyuubi.engine.spark.operation
 import org.apache.spark.sql.types._
 
 import org.apache.kyuubi.engine.spark.shim.SparkCatalogShim
-import org.apache.kyuubi.operation.{IterableFetchIterator, OperationType}
+import org.apache.kyuubi.operation.IterableFetchIterator
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant._
 import org.apache.kyuubi.session.Session
 
@@ -30,7 +30,7 @@ class GetColumns(
     schemaName: String,
     tableName: String,
     columnName: String)
-  extends SparkOperation(OperationType.GET_COLUMNS, session) {
+  extends SparkOperation(session) {
 
   override def statement: String = {
     super.statement +
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetCurrentCatalog.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetCurrentCatalog.scala
index 47b386016..66d707ec0 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetCurrentCatalog.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetCurrentCatalog.scala
@@ -20,12 +20,11 @@ package org.apache.kyuubi.engine.spark.operation
 import org.apache.spark.sql.types.StructType
 
 import org.apache.kyuubi.engine.spark.shim.SparkCatalogShim
-import org.apache.kyuubi.operation.{IterableFetchIterator, OperationType}
+import org.apache.kyuubi.operation.IterableFetchIterator
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant.TABLE_CAT
 import org.apache.kyuubi.session.Session
 
-class GetCurrentCatalog(session: Session)
-  extends SparkOperation(OperationType.EXECUTE_STATEMENT, session) {
+class GetCurrentCatalog(session: Session) extends SparkOperation(session) {
 
   override protected def resultSchema: StructType = {
     new StructType()
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetCurrentDatabase.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetCurrentDatabase.scala
index 954e23898..bcf3ad2a5 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetCurrentDatabase.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetCurrentDatabase.scala
@@ -20,12 +20,11 @@ package org.apache.kyuubi.engine.spark.operation
 import org.apache.spark.sql.types.StructType
 
 import org.apache.kyuubi.engine.spark.shim.SparkCatalogShim
-import org.apache.kyuubi.operation.{IterableFetchIterator, OperationType}
+import org.apache.kyuubi.operation.IterableFetchIterator
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant.TABLE_SCHEM
 import org.apache.kyuubi.session.Session
 
-class GetCurrentDatabase(session: Session)
-  extends SparkOperation(OperationType.EXECUTE_STATEMENT, session) {
+class GetCurrentDatabase(session: Session) extends SparkOperation(session) {
 
   override protected def resultSchema: StructType = {
     new StructType()
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetFunctions.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetFunctions.scala
index d4bce5aa2..71215327d 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetFunctions.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetFunctions.scala
@@ -22,7 +22,7 @@ import java.sql.DatabaseMetaData
 import org.apache.spark.sql.Row
 import org.apache.spark.sql.types.StructType
 
-import org.apache.kyuubi.operation.{IterableFetchIterator, OperationType}
+import org.apache.kyuubi.operation.IterableFetchIterator
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant._
 import org.apache.kyuubi.session.Session
 
@@ -31,7 +31,7 @@ class GetFunctions(
     catalogName: String,
     schemaName: String,
     functionName: String)
-  extends SparkOperation(OperationType.GET_FUNCTIONS, session) {
+  extends SparkOperation(session) {
 
   override def statement: String = {
     super.statement +
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetSchemas.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetSchemas.scala
index 1eaac5f86..3937f528d 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetSchemas.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetSchemas.scala
@@ -20,12 +20,12 @@ package org.apache.kyuubi.engine.spark.operation
 import org.apache.spark.sql.types.StructType
 
 import org.apache.kyuubi.engine.spark.shim.SparkCatalogShim
-import org.apache.kyuubi.operation.{IterableFetchIterator, OperationType}
+import org.apache.kyuubi.operation.IterableFetchIterator
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant._
 import org.apache.kyuubi.session.Session
 
 class GetSchemas(session: Session, catalogName: String, schema: String)
-  extends SparkOperation(OperationType.GET_SCHEMAS, session) {
+  extends SparkOperation(session) {
 
   override def statement: String = {
     super.statement + s" [catalog : $catalogName, schemaPattern : $schema]"
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetTableTypes.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetTableTypes.scala
index f77cd727a..1d2cae381 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetTableTypes.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetTableTypes.scala
@@ -21,12 +21,12 @@ import org.apache.spark.sql.Row
 import org.apache.spark.sql.types.StructType
 
 import org.apache.kyuubi.engine.spark.shim.SparkCatalogShim
-import org.apache.kyuubi.operation.{IterableFetchIterator, OperationType}
+import org.apache.kyuubi.operation.IterableFetchIterator
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant._
 import org.apache.kyuubi.session.Session
 
 class GetTableTypes(session: Session)
-  extends SparkOperation(OperationType.GET_TABLE_TYPES, session) {
+  extends SparkOperation(session) {
   override protected def resultSchema: StructType = {
     new StructType()
       .add(TABLE_TYPE, "string", nullable = true, "Table type name.")
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetTables.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetTables.scala
index d8f56aed5..8f7dbe897 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetTables.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetTables.scala
@@ -20,7 +20,7 @@ package org.apache.kyuubi.engine.spark.operation
 import org.apache.spark.sql.types.StructType
 
 import org.apache.kyuubi.engine.spark.shim.SparkCatalogShim
-import org.apache.kyuubi.operation.{IterableFetchIterator, OperationType}
+import org.apache.kyuubi.operation.IterableFetchIterator
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant._
 import org.apache.kyuubi.session.Session
 
@@ -30,7 +30,7 @@ class GetTables(
     schema: String,
     tableName: String,
     tableTypes: Set[String])
-  extends SparkOperation(OperationType.GET_TABLES, session) {
+  extends SparkOperation(session) {
 
   override def statement: String = {
     super.statement +
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetTypeInfo.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetTypeInfo.scala
index 16b67ebb1..f24735cbf 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetTypeInfo.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/GetTypeInfo.scala
@@ -22,12 +22,11 @@ import java.sql.Types._
 import org.apache.spark.sql.Row
 import org.apache.spark.sql.types.StructType
 
-import org.apache.kyuubi.operation.{IterableFetchIterator, OperationType}
+import org.apache.kyuubi.operation.IterableFetchIterator
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant._
 import org.apache.kyuubi.session.Session
 
-class GetTypeInfo(session: Session)
-  extends SparkOperation(OperationType.GET_TYPE_INFO, session) {
+class GetTypeInfo(session: Session) extends SparkOperation(session) {
   override protected def resultSchema: StructType = {
     new StructType()
       .add(TYPE_NAME, "string", nullable = false, "Type name")
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/PlanOnlyStatement.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/PlanOnlyStatement.scala
index dab86ed7a..61467e5db 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/PlanOnlyStatement.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/PlanOnlyStatement.scala
@@ -23,7 +23,7 @@ import org.apache.spark.sql.types.StructType
 
 import org.apache.kyuubi.config.KyuubiConf.OPERATION_PLAN_ONLY_EXCLUDES
 import org.apache.kyuubi.config.KyuubiConf.OperationModes._
-import org.apache.kyuubi.operation.{ArrayFetchIterator, IterableFetchIterator, OperationType}
+import org.apache.kyuubi.operation.{ArrayFetchIterator, IterableFetchIterator}
 import org.apache.kyuubi.operation.log.OperationLog
 import org.apache.kyuubi.session.Session
 
@@ -34,7 +34,7 @@ class PlanOnlyStatement(
     session: Session,
     override val statement: String,
     mode: OperationMode)
-  extends SparkOperation(OperationType.EXECUTE_STATEMENT, session) {
+  extends SparkOperation(session) {
 
   private val operationLog: OperationLog = OperationLog.createOperationLog(session, getHandle)
   private val planExcludes: Seq[String] = {
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SetCurrentCatalog.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SetCurrentCatalog.scala
index dd0bf987c..4e8c0aa69 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SetCurrentCatalog.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SetCurrentCatalog.scala
@@ -20,11 +20,9 @@ package org.apache.kyuubi.engine.spark.operation
 import org.apache.spark.sql.types.StructType
 
 import org.apache.kyuubi.engine.spark.shim.SparkCatalogShim
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
-class SetCurrentCatalog(session: Session, catalog: String)
-  extends SparkOperation(OperationType.EXECUTE_STATEMENT, session) {
+class SetCurrentCatalog(session: Session, catalog: String) extends SparkOperation(session) {
 
   override protected def resultSchema: StructType = {
     new StructType()
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SetCurrentDatabase.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SetCurrentDatabase.scala
index b4efc15b0..0a21bc839 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SetCurrentDatabase.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SetCurrentDatabase.scala
@@ -20,11 +20,10 @@ package org.apache.kyuubi.engine.spark.operation
 import org.apache.spark.sql.types.StructType
 
 import org.apache.kyuubi.engine.spark.shim.SparkCatalogShim
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class SetCurrentDatabase(session: Session, database: String)
-  extends SparkOperation(OperationType.EXECUTE_STATEMENT, session) {
+  extends SparkOperation(session) {
 
   override protected def resultSchema: StructType = {
     new StructType()
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala
index 590f7cc52..dfa2f5c43 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala
@@ -35,12 +35,11 @@ import org.apache.kyuubi.engine.spark.session.SparkSessionImpl
 import org.apache.kyuubi.operation.{AbstractOperation, FetchIterator, OperationState}
 import org.apache.kyuubi.operation.FetchOrientation._
 import org.apache.kyuubi.operation.OperationState.OperationState
-import org.apache.kyuubi.operation.OperationType.OperationType
 import org.apache.kyuubi.operation.log.OperationLog
 import org.apache.kyuubi.session.Session
 
-abstract class SparkOperation(opType: OperationType, session: Session)
-  extends AbstractOperation(opType, session) {
+abstract class SparkOperation(session: Session)
+  extends AbstractOperation(session) {
 
   protected val spark: SparkSession = session.asInstanceOf[SparkSessionImpl].spark
 
diff --git a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala
index 27766e7c6..3b6c352b8 100644
--- a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala
+++ b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkOperationSuite.scala
@@ -475,8 +475,7 @@ class SparkOperationSuite extends WithSparkSQLEngine with HiveMetadataTests with
       tFetchResultsReq.setMaxRows(1000)
       val tFetchResultsResp = client.FetchResults(tFetchResultsReq)
       assert(tFetchResultsResp.getStatus.getStatusCode === TStatusCode.ERROR_STATUS)
-      assert(tFetchResultsResp.getStatus.getErrorMessage startsWith "Invalid OperationHandle" +
-        " [type=EXECUTE_STATEMENT, identifier:")
+      assert(tFetchResultsResp.getStatus.getErrorMessage startsWith "Invalid OperationHandle [")
 
       val tCloseSessionReq = new TCloseSessionReq()
       tCloseSessionReq.setSessionHandle(tOpenSessionResp.getSessionHandle)
diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/ExecuteStatement.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/ExecuteStatement.scala
index 016c2e977..b6aed48c7 100644
--- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/ExecuteStatement.scala
+++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/ExecuteStatement.scala
@@ -26,7 +26,7 @@ import org.apache.kyuubi.engine.trino.TrinoStatement
 import org.apache.kyuubi.engine.trino.event.TrinoOperationEvent
 import org.apache.kyuubi.engine.trino.schema.RowSet
 import org.apache.kyuubi.events.EventBus
-import org.apache.kyuubi.operation.{ArrayFetchIterator, FetchIterator, OperationState, OperationType}
+import org.apache.kyuubi.operation.{ArrayFetchIterator, FetchIterator, OperationState}
 import org.apache.kyuubi.operation.FetchOrientation.{FETCH_FIRST, FETCH_NEXT, FETCH_PRIOR, FetchOrientation}
 import org.apache.kyuubi.operation.log.OperationLog
 import org.apache.kyuubi.session.Session
@@ -37,7 +37,7 @@ class ExecuteStatement(
     override val shouldRunAsync: Boolean,
     queryTimeout: Long,
     incrementalCollect: Boolean)
-  extends TrinoOperation(OperationType.EXECUTE_STATEMENT, session) with Logging {
+  extends TrinoOperation(session) with Logging {
 
   private val operationLog: OperationLog = OperationLog.createOperationLog(session, getHandle)
   override def getOperationLog: Option[OperationLog] = Option(operationLog)
diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetCatalogs.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetCatalogs.scala
index 597d91598..cdc6e83d3 100644
--- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetCatalogs.scala
+++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetCatalogs.scala
@@ -18,11 +18,10 @@
 package org.apache.kyuubi.engine.trino.operation
 
 import org.apache.kyuubi.engine.trino.TrinoStatement
-import org.apache.kyuubi.operation.{ArrayFetchIterator, OperationType}
+import org.apache.kyuubi.operation.ArrayFetchIterator
 import org.apache.kyuubi.session.Session
 
-class GetCatalogs(session: Session)
-  extends TrinoOperation(OperationType.GET_CATALOGS, session) {
+class GetCatalogs(session: Session) extends TrinoOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetColumns.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetColumns.scala
index f856a23f2..7acb9eec1 100644
--- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetColumns.scala
+++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetColumns.scala
@@ -22,7 +22,7 @@ import scala.collection.mutable.ArrayBuffer
 import org.apache.commons.lang3.StringUtils
 
 import org.apache.kyuubi.engine.trino.TrinoStatement
-import org.apache.kyuubi.operation.{ArrayFetchIterator, OperationType}
+import org.apache.kyuubi.operation.ArrayFetchIterator
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant.{COLUMN_NAME, TABLE_CAT, TABLE_NAME, TABLE_SCHEM}
 import org.apache.kyuubi.session.Session
 
@@ -32,7 +32,7 @@ class GetColumns(
     schemaName: String,
     tableName: String,
     columnName: String)
-  extends TrinoOperation(OperationType.GET_COLUMNS, session) {
+  extends TrinoOperation(session) {
 
   private val SEARCH_STRING_ESCAPE: String = "\\"
 
diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetCurrentCatalog.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetCurrentCatalog.scala
index 2f61f8b13..3d8c7fd6c 100644
--- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetCurrentCatalog.scala
+++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetCurrentCatalog.scala
@@ -22,11 +22,11 @@ import io.trino.client.{ClientTypeSignature, ClientTypeSignatureParameter, Colum
 import io.trino.client.ClientStandardTypes.VARCHAR
 import io.trino.client.ClientTypeSignature.VARCHAR_UNBOUNDED_LENGTH
 
-import org.apache.kyuubi.operation.{IterableFetchIterator, OperationType}
+import org.apache.kyuubi.operation.IterableFetchIterator
 import org.apache.kyuubi.session.Session
 
 class GetCurrentCatalog(session: Session)
-  extends TrinoOperation(OperationType.EXECUTE_STATEMENT, session) {
+  extends TrinoOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetCurrentDatabase.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetCurrentDatabase.scala
index 571fa185d..3bf2987b4 100644
--- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetCurrentDatabase.scala
+++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetCurrentDatabase.scala
@@ -22,11 +22,11 @@ import io.trino.client.{ClientTypeSignature, ClientTypeSignatureParameter, Colum
 import io.trino.client.ClientStandardTypes.VARCHAR
 import io.trino.client.ClientTypeSignature.VARCHAR_UNBOUNDED_LENGTH
 
-import org.apache.kyuubi.operation.{IterableFetchIterator, OperationType}
+import org.apache.kyuubi.operation.IterableFetchIterator
 import org.apache.kyuubi.session.Session
 
 class GetCurrentDatabase(session: Session)
-  extends TrinoOperation(OperationType.EXECUTE_STATEMENT, session) {
+  extends TrinoOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetSchemas.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetSchemas.scala
index f66cf41cc..59d64aa14 100644
--- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetSchemas.scala
+++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetSchemas.scala
@@ -22,13 +22,12 @@ import scala.collection.mutable.ArrayBuffer
 import org.apache.commons.lang3.StringUtils
 
 import org.apache.kyuubi.engine.trino.TrinoStatement
-import org.apache.kyuubi.operation.{ArrayFetchIterator, OperationType}
-import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant.TABLE_CATALOG
-import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant.TABLE_SCHEM
+import org.apache.kyuubi.operation.ArrayFetchIterator
+import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant.{TABLE_CATALOG, TABLE_SCHEM}
 import org.apache.kyuubi.session.Session
 
 class GetSchemas(session: Session, catalogName: String, schemaPattern: String)
-  extends TrinoOperation(OperationType.GET_SCHEMAS, session) {
+  extends TrinoOperation(session) {
 
   private val SEARCH_STRING_ESCAPE: String = "\\"
 
diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetTableTypes.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetTableTypes.scala
index 274d64c29..b5e3908c7 100644
--- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetTableTypes.scala
+++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetTableTypes.scala
@@ -18,11 +18,11 @@
 package org.apache.kyuubi.engine.trino.operation
 
 import org.apache.kyuubi.engine.trino.TrinoStatement
-import org.apache.kyuubi.operation.{ArrayFetchIterator, OperationType}
+import org.apache.kyuubi.operation.ArrayFetchIterator
 import org.apache.kyuubi.session.Session
 
 class GetTableTypes(session: Session)
-  extends TrinoOperation(OperationType.GET_TABLE_TYPES, session) {
+  extends TrinoOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetTables.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetTables.scala
index 038189367..3acfba39c 100644
--- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetTables.scala
+++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetTables.scala
@@ -22,7 +22,7 @@ import scala.collection.mutable.ArrayBuffer
 import org.apache.commons.lang3.StringUtils
 
 import org.apache.kyuubi.engine.trino.TrinoStatement
-import org.apache.kyuubi.operation.{ArrayFetchIterator, OperationType}
+import org.apache.kyuubi.operation.ArrayFetchIterator
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant.{TABLE_CAT, TABLE_NAME, TABLE_SCHEM, TABLE_TYPE}
 import org.apache.kyuubi.session.Session
 
@@ -32,7 +32,7 @@ class GetTables(
     schemaName: String,
     tableName: String,
     tableTypes: Set[String])
-  extends TrinoOperation(OperationType.GET_TABLES, session) {
+  extends TrinoOperation(session) {
 
   private val SEARCH_STRING_ESCAPE: String = "\\"
 
diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetTypeInfo.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetTypeInfo.scala
index ffc96d8a8..0e5272583 100644
--- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetTypeInfo.scala
+++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/GetTypeInfo.scala
@@ -18,11 +18,11 @@
 package org.apache.kyuubi.engine.trino.operation
 
 import org.apache.kyuubi.engine.trino.TrinoStatement
-import org.apache.kyuubi.operation.{ArrayFetchIterator, OperationType}
+import org.apache.kyuubi.operation.ArrayFetchIterator
 import org.apache.kyuubi.session.Session
 
 class GetTypeInfo(session: Session)
-  extends TrinoOperation(OperationType.GET_TYPE_INFO, session) {
+  extends TrinoOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/SetCurrentCatalog.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/SetCurrentCatalog.scala
index 045224d2d..09ba4262f 100644
--- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/SetCurrentCatalog.scala
+++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/SetCurrentCatalog.scala
@@ -19,11 +19,10 @@ package org.apache.kyuubi.engine.trino.operation
 
 import io.trino.client.ClientSession
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class SetCurrentCatalog(session: Session, catalog: String)
-  extends TrinoOperation(OperationType.EXECUTE_STATEMENT, session) {
+  extends TrinoOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/SetCurrentDatabase.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/SetCurrentDatabase.scala
index cc9aa1b84..f25cc9e0c 100644
--- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/SetCurrentDatabase.scala
+++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/SetCurrentDatabase.scala
@@ -19,11 +19,10 @@ package org.apache.kyuubi.engine.trino.operation
 
 import io.trino.client.ClientSession
 
-import org.apache.kyuubi.operation.OperationType
 import org.apache.kyuubi.session.Session
 
 class SetCurrentDatabase(session: Session, database: String)
-  extends TrinoOperation(OperationType.EXECUTE_STATEMENT, session) {
+  extends TrinoOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperation.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperation.scala
index bb569bdb7..49ffbb0cd 100644
--- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperation.scala
+++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperation.scala
@@ -34,12 +34,10 @@ import org.apache.kyuubi.operation.AbstractOperation
 import org.apache.kyuubi.operation.FetchIterator
 import org.apache.kyuubi.operation.FetchOrientation.{FETCH_FIRST, FETCH_NEXT, FETCH_PRIOR, FetchOrientation}
 import org.apache.kyuubi.operation.OperationState
-import org.apache.kyuubi.operation.OperationType.OperationType
 import org.apache.kyuubi.operation.log.OperationLog
 import org.apache.kyuubi.session.Session
 
-abstract class TrinoOperation(opType: OperationType, session: Session)
-  extends AbstractOperation(opType, session) {
+abstract class TrinoOperation(session: Session) extends AbstractOperation(session) {
 
   protected val trinoContext: TrinoContext = session.asInstanceOf[TrinoSessionImpl].trinoContext
 
diff --git a/externals/kyuubi-trino-engine/src/test/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationSuite.scala b/externals/kyuubi-trino-engine/src/test/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationSuite.scala
index af75a8e5c..7b0117f70 100644
--- a/externals/kyuubi-trino-engine/src/test/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationSuite.scala
+++ b/externals/kyuubi-trino-engine/src/test/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationSuite.scala
@@ -709,8 +709,7 @@ class TrinoOperationSuite extends WithTrinoEngine with TrinoQueryTests {
       tFetchResultsReq.setMaxRows(1000)
       val tFetchResultsResp = client.FetchResults(tFetchResultsReq)
       assert(tFetchResultsResp.getStatus.getStatusCode === TStatusCode.ERROR_STATUS)
-      assert(tFetchResultsResp.getStatus.getErrorMessage startsWith "Invalid OperationHandle" +
-        " [type=EXECUTE_STATEMENT, identifier:")
+      assert(tFetchResultsResp.getStatus.getErrorMessage startsWith "Invalid OperationHandle [")
 
       val tCloseSessionReq = new TCloseSessionReq()
       tCloseSessionReq.setSessionHandle(tOpenSessionResp.getSessionHandle)
diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/AbstractOperation.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/AbstractOperation.scala
index 5d0070087..d1567dfec 100644
--- a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/AbstractOperation.scala
+++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/AbstractOperation.scala
@@ -26,16 +26,16 @@ import org.apache.kyuubi.{KyuubiSQLException, Logging}
 import org.apache.kyuubi.config.KyuubiConf.OPERATION_IDLE_TIMEOUT
 import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation
 import org.apache.kyuubi.operation.OperationState._
-import org.apache.kyuubi.operation.OperationType.OperationType
 import org.apache.kyuubi.operation.log.OperationLog
 import org.apache.kyuubi.session.Session
 import org.apache.kyuubi.util.ThreadUtils
 
-abstract class AbstractOperation(opType: OperationType, session: Session)
+abstract class AbstractOperation(session: Session)
   extends Operation with Logging {
 
+  final protected val opType: String = getClass.getSimpleName
   final protected val createTime = System.currentTimeMillis()
-  final private val handle = OperationHandle(opType, session.protocol)
+  final private val handle = OperationHandle(session.protocol)
   final private val operationTimeout: Long = {
     session.sessionManager.getConf.get(OPERATION_IDLE_TIMEOUT)
   }
@@ -85,7 +85,7 @@ abstract class AbstractOperation(opType: OperationType, session: Session)
 
   def getBackgroundHandle: Future[_] = _backgroundHandle
 
-  def statement: String = opType.toString
+  def statement: String = opType
 
   def redactedStatement: String = statement
 
diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationHandle.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationHandle.scala
index 294fa2e02..263324ad6 100644
--- a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationHandle.scala
+++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationHandle.scala
@@ -26,11 +26,9 @@ import org.apache.hive.service.rpc.thrift.{TOperationHandle, TProtocolVersion}
 
 import org.apache.kyuubi.KyuubiSQLException
 import org.apache.kyuubi.cli.Handle
-import org.apache.kyuubi.operation.OperationType.OperationType
 
 case class OperationHandle(
     identifier: UUID,
-    typ: OperationType,
     protocol: TProtocolVersion) extends Handle {
 
   private var _hasResultSet: Boolean = _
@@ -40,35 +38,29 @@ case class OperationHandle(
   implicit def toTOperationHandle: TOperationHandle = {
     val tOperationHandle = new TOperationHandle
     tOperationHandle.setOperationId(Handle.toTHandleIdentifier(identifier))
-    tOperationHandle.setOperationType(OperationType.toTOperationType(typ))
     tOperationHandle.setHasResultSet(_hasResultSet)
     tOperationHandle
   }
 
-  override def hashCode(): Int = {
-    (Objects.hashCode(identifier) + 31) * 31 + Objects.hashCode(typ)
-  }
+  override def hashCode(): Int = Objects.hashCode(identifier)
 
   override def equals(obj: Any): Boolean = obj match {
-    case OperationHandle(id, typ, _) =>
-      Objects.equals(this.typ, typ) && Objects.equals(this.identifier, id)
+    case OperationHandle(id, _) => Objects.equals(this.identifier, id)
     case _ => false
   }
 
-  override def toString: String = {
-    s"OperationHandle [type=$typ, identifier: $identifier]"
-  }
+  override def toString: String = s"OperationHandle [$identifier]"
+
 }
 
 object OperationHandle {
-  def apply(operationType: OperationType, protocol: TProtocolVersion): OperationHandle = {
-    new OperationHandle(UUID.randomUUID(), operationType, protocol)
+  def apply(protocol: TProtocolVersion): OperationHandle = {
+    new OperationHandle(UUID.randomUUID(), protocol)
   }
 
   def apply(tOperationHandle: TOperationHandle, protocol: TProtocolVersion): OperationHandle = {
     new OperationHandle(
       Handle.fromTHandleIdentifier(tOperationHandle.getOperationId),
-      OperationType.getOperationType(tOperationHandle.getOperationType),
       protocol)
   }
 
@@ -79,24 +71,14 @@ object OperationHandle {
   implicit def toTOperationHandle(handle: OperationHandle): TOperationHandle = {
     val tOperationHandle = new TOperationHandle
     tOperationHandle.setOperationId(Handle.toTHandleIdentifier(handle.identifier))
-    tOperationHandle.setOperationType(OperationType.toTOperationType(handle.typ))
     tOperationHandle.setHasResultSet(handle._hasResultSet)
     tOperationHandle
   }
 
   def apply(operationHandleStr: String): OperationHandle = {
     try {
-      val operationHandleParts = operationHandleStr.split("\\|")
-      require(
-        operationHandleParts.size == 2,
-        s"Expected 4 parameters but found ${operationHandleParts.size}.")
-
-      val handleIdentifier = UUID.fromString(operationHandleParts.head)
-      val operationType = OperationType.withName(operationHandleParts.last)
-      OperationHandle(
-        handleIdentifier,
-        operationType,
-        TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V1)
+      val handleIdentifier = UUID.fromString(operationHandleStr)
+      OperationHandle(handleIdentifier, TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V1)
     } catch {
       case NonFatal(e) =>
         throw KyuubiSQLException(s"Invalid $operationHandleStr", e)
diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationType.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationType.scala
deleted file mode 100644
index e3f67d38c..000000000
--- a/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/OperationType.scala
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.kyuubi.operation
-
-import org.apache.hive.service.rpc.thrift.TOperationType
-
-object OperationType extends Enumeration {
-
-  type OperationType = Value
-  val UNKNOWN_OPERATION, EXECUTE_STATEMENT, GET_TYPE_INFO, GET_CATALOGS, GET_SCHEMAS, GET_TABLES,
-      GET_TABLE_TYPES, GET_COLUMNS, GET_FUNCTIONS = Value
-
-  def getOperationType(from: TOperationType): OperationType = {
-    from match {
-      case TOperationType.EXECUTE_STATEMENT => EXECUTE_STATEMENT
-      case TOperationType.GET_TYPE_INFO => GET_TYPE_INFO
-      case TOperationType.GET_CATALOGS => GET_CATALOGS
-      case TOperationType.GET_SCHEMAS => GET_SCHEMAS
-      case TOperationType.GET_TABLES => GET_TABLES
-      case TOperationType.GET_TABLE_TYPES => GET_TABLE_TYPES
-      case TOperationType.GET_COLUMNS => GET_COLUMNS
-      case TOperationType.GET_FUNCTIONS => GET_FUNCTIONS
-      case TOperationType.UNKNOWN => UNKNOWN_OPERATION
-      case other =>
-        throw new UnsupportedOperationException(s"Unsupported Operation type: ${other.toString}")
-    }
-  }
-
-  def toTOperationType(from: OperationType): TOperationType = {
-    from match {
-      case EXECUTE_STATEMENT => TOperationType.EXECUTE_STATEMENT
-      case GET_TYPE_INFO => TOperationType.GET_TYPE_INFO
-      case GET_CATALOGS => TOperationType.GET_CATALOGS
-      case GET_SCHEMAS => TOperationType.GET_SCHEMAS
-      case GET_TABLES => TOperationType.GET_TABLES
-      case GET_TABLE_TYPES => TOperationType.GET_TABLE_TYPES
-      case GET_COLUMNS => TOperationType.GET_COLUMNS
-      case GET_FUNCTIONS => TOperationType.GET_FUNCTIONS
-      case UNKNOWN_OPERATION => TOperationType.UNKNOWN
-      case other =>
-        throw new UnsupportedOperationException(s"Unsupported Operation type: ${other.toString}")
-    }
-  }
-}
diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/TFrontendService.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/TFrontendService.scala
index c9a9e1d78..31de60080 100644
--- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/TFrontendService.scala
+++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/TFrontendService.scala
@@ -237,7 +237,9 @@ abstract class TFrontendService(name: String)
         confOverlay.asScala.toMap,
         runAsync,
         queryTimeout)
-      resp.setOperationHandle(operationHandle.toTOperationHandle)
+      val tOperationHandle = operationHandle.toTOperationHandle
+      tOperationHandle.setOperationType(TOperationType.EXECUTE_STATEMENT)
+      resp.setOperationHandle(tOperationHandle)
       resp.setStatus(OK_STATUS)
     } catch {
       case e: Exception =>
@@ -252,7 +254,9 @@ abstract class TFrontendService(name: String)
     val resp = new TGetTypeInfoResp
     try {
       val operationHandle = be.getTypeInfo(SessionHandle(req.getSessionHandle))
-      resp.setOperationHandle(operationHandle.toTOperationHandle)
+      val tOperationHandle = operationHandle.toTOperationHandle
+      tOperationHandle.setOperationType(TOperationType.GET_TYPE_INFO)
+      resp.setOperationHandle(tOperationHandle)
       resp.setStatus(OK_STATUS)
     } catch {
       case e: Exception =>
@@ -267,7 +271,9 @@ abstract class TFrontendService(name: String)
     val resp = new TGetCatalogsResp
     try {
       val opHandle = be.getCatalogs(SessionHandle(req.getSessionHandle))
-      resp.setOperationHandle(opHandle.toTOperationHandle)
+      val tOperationHandle = opHandle.toTOperationHandle
+      tOperationHandle.setOperationType(TOperationType.GET_CATALOGS)
+      resp.setOperationHandle(tOperationHandle)
       resp.setStatus(OK_STATUS)
     } catch {
       case e: Exception =>
@@ -285,7 +291,9 @@ abstract class TFrontendService(name: String)
         SessionHandle(req.getSessionHandle),
         req.getCatalogName,
         req.getSchemaName)
-      resp.setOperationHandle(opHandle.toTOperationHandle)
+      val tOperationHandle = opHandle.toTOperationHandle
+      tOperationHandle.setOperationType(TOperationType.GET_SCHEMAS)
+      resp.setOperationHandle(tOperationHandle)
       resp.setStatus(OK_STATUS)
     } catch {
       case e: Exception =>
@@ -305,7 +313,9 @@ abstract class TFrontendService(name: String)
       val table = req.getTableName
       val tableTypes = req.getTableTypes
       val opHandle = be.getTables(sessionHandle, catalog, schema, table, tableTypes)
-      resp.setOperationHandle(opHandle.toTOperationHandle)
+      val tOperationHandle = opHandle.toTOperationHandle
+      tOperationHandle.setOperationType(TOperationType.GET_TABLES)
+      resp.setOperationHandle(tOperationHandle)
       resp.setStatus(OK_STATUS)
     } catch {
       case e: Exception =>
@@ -320,7 +330,9 @@ abstract class TFrontendService(name: String)
     val resp = new TGetTableTypesResp
     try {
       val opHandle = be.getTableTypes(SessionHandle(req.getSessionHandle))
-      resp.setOperationHandle(opHandle.toTOperationHandle)
+      val tOperationHandle = opHandle.toTOperationHandle
+      tOperationHandle.setOperationType(TOperationType.GET_TABLE_TYPES)
+      resp.setOperationHandle(tOperationHandle)
       resp.setStatus(OK_STATUS)
     } catch {
       case e: Exception =>
@@ -340,7 +352,9 @@ abstract class TFrontendService(name: String)
       val table = req.getTableName
       val col = req.getColumnName
       val opHandle = be.getColumns(sessionHandle, catalog, schema, table, col)
-      resp.setOperationHandle(opHandle.toTOperationHandle)
+      val tOperationHandle = opHandle.toTOperationHandle
+      tOperationHandle.setOperationType(TOperationType.GET_COLUMNS)
+      resp.setOperationHandle(tOperationHandle)
       resp.setStatus(OK_STATUS)
     } catch {
       case e: Exception =>
@@ -359,7 +373,9 @@ abstract class TFrontendService(name: String)
       val schema = req.getSchemaName
       val func = req.getFunctionName
       val opHandle = be.getFunctions(sessionHandle, catalog, schema, func)
-      resp.setOperationHandle(opHandle.toTOperationHandle)
+      val tOperationHandle = opHandle.toTOperationHandle
+      tOperationHandle.setOperationType(TOperationType.GET_FUNCTIONS)
+      resp.setOperationHandle(tOperationHandle)
       resp.setStatus(OK_STATUS)
     } catch {
       case e: Exception =>
@@ -378,7 +394,9 @@ abstract class TFrontendService(name: String)
       val schema = req.getSchemaName
       val table = req.getTableName
       val opHandle = be.getPrimaryKeys(sessionHandle, catalog, schema, table)
-      resp.setOperationHandle(opHandle.toTOperationHandle)
+      val tOperationHandle = opHandle.toTOperationHandle
+      tOperationHandle.setOperationType(TOperationType.GET_FUNCTIONS)
+      resp.setOperationHandle(tOperationHandle)
       resp.setStatus(OK_STATUS)
     } catch {
       case e: Exception =>
@@ -407,7 +425,9 @@ abstract class TFrontendService(name: String)
         foreignCatalog,
         foreignSchema,
         foreignTable)
-      resp.setOperationHandle(opHandle.toTOperationHandle)
+      val tOperationHandle = opHandle.toTOperationHandle
+      tOperationHandle.setOperationType(TOperationType.GET_FUNCTIONS)
+      resp.setOperationHandle(tOperationHandle)
       resp.setStatus(OK_STATUS)
     } catch {
       case e: Exception =>
diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperation.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperation.scala
index a307712ba..ecabd505b 100644
--- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperation.scala
+++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperation.scala
@@ -25,13 +25,12 @@ import org.apache.hive.service.rpc.thrift.{TColumn, TColumnDesc, TPrimitiveTypeE
 
 import org.apache.kyuubi.KyuubiSQLException
 import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation
-import org.apache.kyuubi.operation.OperationType.OperationType
 import org.apache.kyuubi.operation.log.OperationLog
 import org.apache.kyuubi.session.Session
 import org.apache.kyuubi.util.ThriftUtils
 
-class NoopOperation(typ: OperationType, session: Session, shouldFail: Boolean = false)
-  extends AbstractOperation(typ, session) {
+class NoopOperation(session: Session, shouldFail: Boolean = false)
+  extends AbstractOperation(session) {
   override protected def runInternal(): Unit = {
     setState(OperationState.RUNNING)
     if (shouldFail) {
@@ -75,7 +74,7 @@ class NoopOperation(typ: OperationType, session: Session, shouldFail: Boolean =
   }
 
   override def getNextRowSet(order: FetchOrientation, rowSetSize: Int): TRowSet = {
-    val col = TColumn.stringVal(new TStringColumn(Seq(typ.toString).asJava, ByteBuffer.allocate(0)))
+    val col = TColumn.stringVal(new TStringColumn(Seq(opType).asJava, ByteBuffer.allocate(0)))
     val tRowSet = ThriftUtils.newEmptyRowSet
     tRowSet.addToColumns(col)
     tRowSet
diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperationManager.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperationManager.scala
index 271e4d2e1..455e5d4d2 100644
--- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperationManager.scala
+++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/NoopOperationManager.scala
@@ -34,38 +34,37 @@ class NoopOperationManager extends OperationManager("noop") {
       confOverlay: Map[String, String],
       runAsync: Boolean,
       queryTimeout: Long): Operation = {
-    val operation =
-      new NoopOperation(OperationType.EXECUTE_STATEMENT, session, statement == invalid)
+    val operation = new NoopOperation(session, statement == invalid)
     addOperation(operation)
   }
 
   override def newSetCurrentCatalogOperation(session: Session, catalog: String): Operation = {
-    val operation = new NoopOperation(OperationType.EXECUTE_STATEMENT, session)
+    val operation = new NoopOperation(session)
     addOperation(operation)
   }
 
   override def newGetCurrentCatalogOperation(session: Session): Operation = {
-    val operation = new NoopOperation(OperationType.EXECUTE_STATEMENT, session)
+    val operation = new NoopOperation(session)
     addOperation(operation)
   }
 
   override def newSetCurrentDatabaseOperation(session: Session, database: String): Operation = {
-    val operation = new NoopOperation(OperationType.EXECUTE_STATEMENT, session)
+    val operation = new NoopOperation(session)
     addOperation(operation)
   }
 
   override def newGetCurrentDatabaseOperation(session: Session): Operation = {
-    val operation = new NoopOperation(OperationType.EXECUTE_STATEMENT, session)
+    val operation = new NoopOperation(session)
     addOperation(operation)
   }
 
   override def newGetTypeInfoOperation(session: Session): Operation = {
-    val operation = new NoopOperation(OperationType.GET_TYPE_INFO, session)
+    val operation = new NoopOperation(session)
     addOperation(operation)
   }
 
   override def newGetCatalogsOperation(session: Session): Operation = {
-    val operation = new NoopOperation(OperationType.GET_CATALOGS, session)
+    val operation = new NoopOperation(session)
     addOperation(operation)
   }
 
@@ -73,7 +72,7 @@ class NoopOperationManager extends OperationManager("noop") {
       session: Session,
       catalog: String,
       schema: String): Operation = {
-    val operation = new NoopOperation(OperationType.GET_SCHEMAS, session)
+    val operation = new NoopOperation(session)
     addOperation(operation)
   }
 
@@ -83,12 +82,12 @@ class NoopOperationManager extends OperationManager("noop") {
       schemaName: String,
       tableName: String,
       tableTypes: java.util.List[String]): Operation = {
-    val operation = new NoopOperation(OperationType.GET_TABLES, session, schemaName == invalid)
+    val operation = new NoopOperation(session, schemaName == invalid)
     addOperation(operation)
   }
 
   override def newGetTableTypesOperation(session: Session): Operation = {
-    val operation = new NoopOperation(OperationType.GET_TABLE_TYPES, session)
+    val operation = new NoopOperation(session)
     addOperation(operation)
   }
 
@@ -98,7 +97,7 @@ class NoopOperationManager extends OperationManager("noop") {
       schemaName: String,
       tableName: String,
       columnName: String): Operation = {
-    val operation = new NoopOperation(OperationType.GET_COLUMNS, session)
+    val operation = new NoopOperation(session)
     addOperation(operation)
   }
 
@@ -107,7 +106,7 @@ class NoopOperationManager extends OperationManager("noop") {
       catalogName: String,
       schemaName: String,
       functionName: String): Operation = {
-    val operation = new NoopOperation(OperationType.GET_FUNCTIONS, session)
+    val operation = new NoopOperation(session)
     addOperation(operation)
   }
 
@@ -117,7 +116,7 @@ class NoopOperationManager extends OperationManager("noop") {
       schemaName: String,
       tableName: String): Operation = {
     val operation =
-      new NoopOperation(OperationType.GET_FUNCTIONS, session, schemaName == invalid)
+      new NoopOperation(session, schemaName == invalid)
     addOperation(operation)
   }
 
@@ -130,7 +129,7 @@ class NoopOperationManager extends OperationManager("noop") {
       foreignSchema: String,
       foreignTable: String): Operation = {
     val operation =
-      new NoopOperation(OperationType.GET_FUNCTIONS, session, primarySchema == invalid)
+      new NoopOperation(session, primarySchema == invalid)
     addOperation(operation)
   }
 
diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationHandleSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationHandleSuite.scala
index e9e8898f2..1a504a58e 100644
--- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationHandleSuite.scala
+++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationHandleSuite.scala
@@ -23,14 +23,13 @@ import org.apache.hive.service.rpc.thrift.TProtocolVersion
 import org.apache.hive.service.rpc.thrift.TProtocolVersion._
 
 import org.apache.kyuubi.KyuubiFunSuite
-import org.apache.kyuubi.operation.OperationType._
 
 class OperationHandleSuite extends KyuubiFunSuite {
 
   test("OperationHandle") {
-    val h1 = OperationHandle(EXECUTE_STATEMENT, HIVE_CLI_SERVICE_PROTOCOL_V10)
+    val h1 = OperationHandle(HIVE_CLI_SERVICE_PROTOCOL_V10)
     TProtocolVersion.values().foreach { protocol =>
-      assert(h1 === OperationHandle(h1.identifier, h1.typ, protocol))
+      assert(h1 === OperationHandle(h1.identifier, protocol))
     }
 
     val t1 = h1.toTOperationHandle
@@ -44,9 +43,7 @@ class OperationHandleSuite extends KyuubiFunSuite {
     assert(h1.toTOperationHandle.isHasResultSet)
     assert(h1 !== null)
     assert(h1 !== new Integer(1))
-    val h3 = OperationHandle(h1.identifier, GET_CATALOGS, HIVE_CLI_SERVICE_PROTOCOL_V10)
-    assert(h3 !== h1, "different types")
-    val h4 = OperationHandle(UUID.randomUUID(), h1.typ, HIVE_CLI_SERVICE_PROTOCOL_V10)
+    val h4 = OperationHandle(UUID.randomUUID(), HIVE_CLI_SERVICE_PROTOCOL_V10)
     assert(h4 !== h1)
   }
 }
diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationTypeSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationTypeSuite.scala
deleted file mode 100644
index c4a55724f..000000000
--- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/OperationTypeSuite.scala
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.kyuubi.operation
-
-import org.apache.hive.service.rpc.thrift.TOperationType
-
-import org.apache.kyuubi.KyuubiFunSuite
-
-class OperationTypeSuite extends KyuubiFunSuite {
-
-  import OperationType._
-
-  test("getOperationType") {
-    val get = OperationType.getOperationType _
-    assert(get(TOperationType.EXECUTE_STATEMENT) === EXECUTE_STATEMENT)
-    assert(get(TOperationType.GET_TYPE_INFO) === GET_TYPE_INFO)
-    assert(get(TOperationType.GET_CATALOGS) === GET_CATALOGS)
-    assert(get(TOperationType.GET_SCHEMAS) === GET_SCHEMAS)
-    assert(get(TOperationType.GET_TABLES) === GET_TABLES)
-    assert(get(TOperationType.GET_TABLE_TYPES) === GET_TABLE_TYPES)
-    assert(get(TOperationType.GET_COLUMNS) === GET_COLUMNS)
-    assert(get(TOperationType.GET_FUNCTIONS) === GET_FUNCTIONS)
-    assert(get(TOperationType.UNKNOWN) === UNKNOWN_OPERATION)
-  }
-
-  test("toTOperationType") {
-    val to = OperationType.toTOperationType _
-    assert(to(EXECUTE_STATEMENT) === TOperationType.EXECUTE_STATEMENT)
-    assert(to(GET_TYPE_INFO) === TOperationType.GET_TYPE_INFO)
-    assert(to(GET_CATALOGS) === TOperationType.GET_CATALOGS)
-    assert(to(GET_SCHEMAS) === TOperationType.GET_SCHEMAS)
-    assert(to(GET_TABLES) === TOperationType.GET_TABLES)
-    assert(to(GET_TABLE_TYPES) === TOperationType.GET_TABLE_TYPES)
-    assert(to(GET_COLUMNS) === TOperationType.GET_COLUMNS)
-    assert(to(GET_FUNCTIONS) === TOperationType.GET_FUNCTIONS)
-    assert(to(UNKNOWN_OPERATION) === TOperationType.UNKNOWN)
-  }
-}
diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/log/OperationLogSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/log/OperationLogSuite.scala
index 77df2bf32..8211ab047 100644
--- a/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/log/OperationLogSuite.scala
+++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/operation/log/OperationLogSuite.scala
@@ -27,7 +27,7 @@ import org.apache.hive.service.rpc.thrift.{TProtocolVersion, TRowSet}
 
 import org.apache.kyuubi.{KyuubiFunSuite, KyuubiSQLException, Utils}
 import org.apache.kyuubi.config.KyuubiConf
-import org.apache.kyuubi.operation.{OperationHandle, OperationType}
+import org.apache.kyuubi.operation.OperationHandle
 import org.apache.kyuubi.session.NoopSessionManager
 
 class OperationLogSuite extends KyuubiFunSuite {
@@ -46,7 +46,6 @@ class OperationLogSuite extends KyuubiFunSuite {
       Map.empty)
     val session = sessionManager.getSession(sHandle)
     val oHandle = OperationHandle(
-      OperationType.EXECUTE_STATEMENT,
       TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10)
     assert(sessionManager.operationLogRoot.isDefined)
     val operationLogRoot = sessionManager.operationLogRoot.get
@@ -99,7 +98,6 @@ class OperationLogSuite extends KyuubiFunSuite {
       Map.empty)
     val session = sessionManager.getSession(sHandle)
     val oHandle = OperationHandle(
-      OperationType.EXECUTE_STATEMENT,
       TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10)
 
     OperationLog.createOperationLogRootDirectory(session)
@@ -150,7 +148,6 @@ class OperationLogSuite extends KyuubiFunSuite {
     OperationLog.createOperationLogRootDirectory(session)
     assert(logRoot.isFile)
     val oHandle = OperationHandle(
-      OperationType.EXECUTE_STATEMENT,
       TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10)
     intercept[Exception] {
       val log = OperationLog.createOperationLog(session, oHandle)
@@ -192,7 +189,6 @@ class OperationLogSuite extends KyuubiFunSuite {
       Map.empty)
     val session = sessionManager.getSession(sHandle)
     val oHandle = OperationHandle(
-      OperationType.EXECUTE_STATEMENT,
       TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10)
     OperationLog.createOperationLogRootDirectory(session)
 
diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/TFrontendServiceSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/TFrontendServiceSuite.scala
index c966e7b7f..f27a92fac 100644
--- a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/TFrontendServiceSuite.scala
+++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/TFrontendServiceSuite.scala
@@ -27,7 +27,7 @@ import org.scalatest.time._
 import org.apache.kyuubi.{KyuubiFunSuite, KyuubiSQLException, Utils}
 import org.apache.kyuubi.config.KyuubiConf
 import org.apache.kyuubi.config.KyuubiConf.{FRONTEND_BIND_HOST, FRONTEND_CONNECTION_URL_USE_HOSTNAME, FRONTEND_THRIFT_BINARY_BIND_HOST, FRONTEND_THRIFT_BINARY_BIND_PORT}
-import org.apache.kyuubi.operation.{OperationHandle, OperationType, TClientTestUtils}
+import org.apache.kyuubi.operation.{OperationHandle, TClientTestUtils}
 import org.apache.kyuubi.service.TFrontendService.{FeServiceServerContext, SERVER_VERSION}
 import org.apache.kyuubi.session.{AbstractSession, SessionHandle}
 
@@ -67,7 +67,7 @@ class TFrontendServiceSuite extends KyuubiFunSuite {
     tFetchResultsReq.setOrientation(TFetchOrientation.FETCH_NEXT)
     tFetchResultsReq.setMaxRows(10)
     val resp = client.FetchResults(tFetchResultsReq)
-    val expected = handle.getOperationType.toString
+    val expected = "NoopOperation"
     val actual = resp.getResults.getColumns.get(0).getStringVal.getValues.get(0)
     assert(actual === expected)
     tFetchResultsReq.setFetchType(1)
@@ -75,7 +75,8 @@ class TFrontendServiceSuite extends KyuubiFunSuite {
     assert(resp1.getStatus.getStatusCode === TStatusCode.SUCCESS_STATUS)
     assert(resp1.getResults.getColumnCount === 0)
     val invalidHandle =
-      OperationHandle(OperationType.getOperationType(handle.getOperationType), SERVER_VERSION)
+      OperationHandle(SERVER_VERSION).toTOperationHandle
+    invalidHandle.setOperationType(TOperationType.EXECUTE_STATEMENT)
     tFetchResultsReq.setOperationHandle(invalidHandle)
     val errResp = client.FetchResults(tFetchResultsReq)
     errResp.getStatus
@@ -374,8 +375,8 @@ class TFrontendServiceSuite extends KyuubiFunSuite {
 
   test("get operation status") {
     withSessionHandle { (client, handle) =>
-      val opHandle =
-        OperationHandle(OperationType.EXECUTE_STATEMENT, SERVER_VERSION)
+      val opHandle = OperationHandle(SERVER_VERSION).toTOperationHandle
+      opHandle.setOperationType(TOperationType.GET_TABLES)
       val req = new TGetOperationStatusReq(opHandle)
       val resp = client.GetOperationStatus(req)
       assert(resp.getStatus.getStatusCode === TStatusCode.ERROR_STATUS)
@@ -428,8 +429,8 @@ class TFrontendServiceSuite extends KyuubiFunSuite {
 
   test("cancel operation") {
     withSessionHandle { (client, handle) =>
-      val opHandle =
-        OperationHandle(OperationType.EXECUTE_STATEMENT, SERVER_VERSION)
+      val opHandle = OperationHandle(SERVER_VERSION).toTOperationHandle
+      opHandle.setOperationType(TOperationType.EXECUTE_STATEMENT)
       val req = new TCancelOperationReq()
       req.setOperationHandle(opHandle)
       val resp = client.CancelOperation(req)
@@ -448,8 +449,8 @@ class TFrontendServiceSuite extends KyuubiFunSuite {
 
   test("close operation") {
     withSessionHandle { (client, handle) =>
-      val opHandle =
-        OperationHandle(OperationType.EXECUTE_STATEMENT, SERVER_VERSION)
+      val opHandle = OperationHandle(SERVER_VERSION).toTOperationHandle
+      opHandle.setOperationType(TOperationType.EXECUTE_STATEMENT)
       val req = new TCloseOperationReq()
       req.setOperationHandle(opHandle)
       val resp = client.CloseOperation(req)
@@ -477,7 +478,9 @@ class TFrontendServiceSuite extends KyuubiFunSuite {
       assert(resp.getSchema.getColumns.get(0).getComment === "comment")
       assert(resp.getSchema.getColumns.get(0).getPosition === 0)
 
-      req1.setOperationHandle(OperationHandle(OperationType.EXECUTE_STATEMENT, SERVER_VERSION))
+      val handle1 = OperationHandle(SERVER_VERSION).toTOperationHandle
+      handle1.setOperationType(TOperationType.GET_SCHEMAS)
+      req1.setOperationHandle(handle1)
       val resp1 = client.GetResultSetMetadata(req1)
       assert(resp1.getStatus.getStatusCode === TStatusCode.ERROR_STATUS)
       assert(resp1.getStatus.getSqlState === null)
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala
index 9259fe04b..097e0bc19 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala
@@ -63,7 +63,7 @@ class BatchJobSubmission(
     batchConf: Map[String, String],
     batchArgs: Seq[String],
     recoveryMetadata: Option[Metadata])
-  extends KyuubiOperation(OperationType.UNKNOWN_OPERATION, session) {
+  extends KyuubiOperation(session) {
   import BatchJobSubmission._
 
   override def statement: String = "BATCH_JOB_SUBMISSION"
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala
index c048068a6..c20e82936 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala
@@ -35,7 +35,7 @@ class ExecuteStatement(
     confOverlay: Map[String, String],
     override val shouldRunAsync: Boolean,
     queryTimeout: Long)
-  extends KyuubiOperation(OperationType.EXECUTE_STATEMENT, session) {
+  extends KyuubiOperation(session) {
   EventBus.post(KyuubiOperationEvent(this))
 
   final private val _operationLog: OperationLog =
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetCatalogs.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetCatalogs.scala
index 7553373d3..8af9b971b 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetCatalogs.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetCatalogs.scala
@@ -19,7 +19,7 @@ package org.apache.kyuubi.operation
 
 import org.apache.kyuubi.session.Session
 
-class GetCatalogs(session: Session) extends KyuubiOperation(OperationType.GET_CATALOGS, session) {
+class GetCatalogs(session: Session) extends KyuubiOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetColumns.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetColumns.scala
index 705372c52..3c4c1dbe8 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetColumns.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetColumns.scala
@@ -25,7 +25,7 @@ class GetColumns(
     schemaName: String,
     tableName: String,
     columnName: String)
-  extends KyuubiOperation(OperationType.GET_COLUMNS, session) {
+  extends KyuubiOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetCrossReference.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetCrossReference.scala
index cdc032171..6828e3cf7 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetCrossReference.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetCrossReference.scala
@@ -27,7 +27,7 @@ class GetCrossReference(
     foreignCatalog: String,
     foreignSchema: String,
     foreignTable: String)
-  extends KyuubiOperation(OperationType.GET_FUNCTIONS, session) {
+  extends KyuubiOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetFunctions.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetFunctions.scala
index bd3f3f5b8..cac859329 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetFunctions.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetFunctions.scala
@@ -24,7 +24,7 @@ class GetFunctions(
     catalogName: String,
     schemaName: String,
     functionName: String)
-  extends KyuubiOperation(OperationType.GET_FUNCTIONS, session) {
+  extends KyuubiOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetPrimaryKeys.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetPrimaryKeys.scala
index 1f2838b02..0bc94baa0 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetPrimaryKeys.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetPrimaryKeys.scala
@@ -24,7 +24,7 @@ class GetPrimaryKeys(
     catalogName: String,
     schemaName: String,
     tableName: String)
-  extends KyuubiOperation(OperationType.GET_FUNCTIONS, session) {
+  extends KyuubiOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetSchemas.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetSchemas.scala
index b6d3d54b5..e446dcdf3 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetSchemas.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetSchemas.scala
@@ -23,7 +23,7 @@ class GetSchemas(
     session: Session,
     catalogName: String,
     schemaName: String)
-  extends KyuubiOperation(OperationType.GET_SCHEMAS, session) {
+  extends KyuubiOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetTableTypes.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetTableTypes.scala
index 16acb19a7..bd9a7191c 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetTableTypes.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetTableTypes.scala
@@ -19,8 +19,7 @@ package org.apache.kyuubi.operation
 
 import org.apache.kyuubi.session.Session
 
-class GetTableTypes(session: Session)
-  extends KyuubiOperation(OperationType.GET_TABLE_TYPES, session) {
+class GetTableTypes(session: Session) extends KyuubiOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetTables.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetTables.scala
index 697c7d6fe..c054b1382 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetTables.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetTables.scala
@@ -25,7 +25,7 @@ class GetTables(
     schemaName: String,
     tableName: String,
     tableTypes: java.util.List[String])
-  extends KyuubiOperation(OperationType.GET_TABLES, session) {
+  extends KyuubiOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetTypeInfo.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetTypeInfo.scala
index 4a1b6050f..db5af0da5 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetTypeInfo.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/GetTypeInfo.scala
@@ -19,7 +19,7 @@ package org.apache.kyuubi.operation
 
 import org.apache.kyuubi.session.Session
 
-class GetTypeInfo(session: Session) extends KyuubiOperation(OperationType.GET_TYPE_INFO, session) {
+class GetTypeInfo(session: Session) extends KyuubiOperation(session) {
 
   override protected def runInternal(): Unit = {
     try {
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/KyuubiOperation.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/KyuubiOperation.scala
index 88b3a9ab9..9f13980c1 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/KyuubiOperation.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/KyuubiOperation.scala
@@ -30,21 +30,14 @@ import org.apache.kyuubi.metrics.MetricsConstants.{OPERATION_FAIL, OPERATION_OPE
 import org.apache.kyuubi.metrics.MetricsSystem
 import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation
 import org.apache.kyuubi.operation.OperationState.OperationState
-import org.apache.kyuubi.operation.OperationType.OperationType
 import org.apache.kyuubi.session.{KyuubiSessionImpl, Session}
 import org.apache.kyuubi.util.ThriftUtils
 
-abstract class KyuubiOperation(opType: OperationType, session: Session)
-  extends AbstractOperation(opType, session) {
-
-  private val opTypeName = (opType match {
-    case OperationType.UNKNOWN_OPERATION => statement
-    case _ => opType.toString
-  }).toLowerCase
+abstract class KyuubiOperation(session: Session) extends AbstractOperation(session) {
 
   MetricsSystem.tracing { ms =>
-    ms.incCount(MetricRegistry.name(OPERATION_OPEN, opTypeName))
-    ms.incCount(MetricRegistry.name(OPERATION_TOTAL, opTypeName))
+    ms.incCount(MetricRegistry.name(OPERATION_OPEN, opType))
+    ms.incCount(MetricRegistry.name(OPERATION_TOTAL, opType))
     ms.incCount(MetricRegistry.name(OPERATION_TOTAL))
     ms.markMeter(MetricRegistry.name(OPERATION_STATE, state.toString.toLowerCase))
   }
@@ -67,7 +60,7 @@ abstract class KyuubiOperation(opType: OperationType, session: Session)
         } else {
           val errorType = e.getClass.getSimpleName
           MetricsSystem.tracing(_.incCount(
-            MetricRegistry.name(OPERATION_FAIL, opTypeName, errorType)))
+            MetricRegistry.name(OPERATION_FAIL, opType, errorType)))
           val ke = e match {
             case kse: KyuubiSQLException => kse
             case te: TTransportException
@@ -103,7 +96,7 @@ abstract class KyuubiOperation(opType: OperationType, session: Session)
   override def cancel(): Unit = state.synchronized {
     if (!isClosedOrCanceled) {
       setState(OperationState.CANCELED)
-      MetricsSystem.tracing(_.decCount(MetricRegistry.name(OPERATION_OPEN, opTypeName)))
+      MetricsSystem.tracing(_.decCount(MetricRegistry.name(OPERATION_OPEN, opType)))
       if (_remoteOpHandle != null) {
         try {
           client.cancelOperation(_remoteOpHandle)
@@ -118,7 +111,7 @@ abstract class KyuubiOperation(opType: OperationType, session: Session)
   override def close(): Unit = state.synchronized {
     if (!isClosedOrCanceled) {
       setState(OperationState.CLOSED)
-      MetricsSystem.tracing(_.decCount(MetricRegistry.name(OPERATION_OPEN, opTypeName)))
+      MetricsSystem.tracing(_.decCount(MetricRegistry.name(OPERATION_OPEN, opType)))
       try {
         // For launch engine operation, we use OperationLog to pass engine submit log but
         // at that time we do not have remoteOpHandle
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/LaunchEngine.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/LaunchEngine.scala
index 46ec94225..580223b54 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/LaunchEngine.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/LaunchEngine.scala
@@ -21,7 +21,7 @@ import org.apache.kyuubi.operation.log.OperationLog
 import org.apache.kyuubi.session.KyuubiSessionImpl
 
 class LaunchEngine(session: KyuubiSessionImpl, override val shouldRunAsync: Boolean)
-  extends KyuubiOperation(OperationType.UNKNOWN_OPERATION, session) {
+  extends KyuubiOperation(session) {
 
   override def statement: String = "LAUNCH_ENGINE"
 
diff --git a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/OperationsResourceSuite.scala b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/OperationsResourceSuite.scala
index 1b99eefc9..c4249ea2b 100644
--- a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/OperationsResourceSuite.scala
+++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/OperationsResourceSuite.scala
@@ -17,6 +17,7 @@
 
 package org.apache.kyuubi.server.api.v1
 
+import java.util.UUID
 import javax.ws.rs.client.Entity
 import javax.ws.rs.core.MediaType
 
@@ -29,22 +30,20 @@ import org.scalatest.time.SpanSugar.convertIntToGrainOfTime
 import org.apache.kyuubi.{KyuubiFunSuite, RestFrontendTestHelper}
 import org.apache.kyuubi.client.api.v1.dto._
 import org.apache.kyuubi.events.KyuubiOperationEvent
-import org.apache.kyuubi.operation.{ExecuteStatement, OperationState, OperationType}
+import org.apache.kyuubi.operation.{ExecuteStatement, OperationState}
 import org.apache.kyuubi.operation.OperationState.{FINISHED, OperationState}
-import org.apache.kyuubi.operation.OperationType.OperationType
 
 class OperationsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {
 
   test("get an operation event") {
-    val catalogsHandleStr = getOpHandleStr(OperationType.GET_CATALOGS)
+    val catalogsHandleStr = getOpHandleStr("")
     checkOpState(catalogsHandleStr, FINISHED)
 
-    val statementHandleStr = getOpHandleStr(OperationType.EXECUTE_STATEMENT)
+    val statementHandleStr = getOpHandleStr()
     checkOpState(statementHandleStr, FINISHED)
 
     // Invalid operationHandleStr
-    val invalidOperationHandle =
-      statementHandleStr.replaceAll("EXECUTE_STATEMENT", "GET_TYPE_INFO")
+    val invalidOperationHandle = UUID.randomUUID().toString
     val response = webTarget.path(s"api/v1/operations/$invalidOperationHandle/event")
       .request(MediaType.APPLICATION_JSON_TYPE).get()
     assert(404 == response.getStatus)
@@ -62,8 +61,7 @@ class OperationsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper
     val op = new ExecuteStatement(session, "show tables", Map.empty, true, 3000)
     op.setState(OperationState.RUNNING)
     sessionManager.operationManager.addOperation(op)
-    val opHandleStr = s"${op.getHandle.identifier}|" +
-      s"${op.getHandle.typ.toString}"
+    val opHandleStr = op.getHandle.identifier.toString
     var response = webTarget.path(s"api/v1/operations/$opHandleStr")
       .request(MediaType.APPLICATION_JSON_TYPE)
       .put(Entity.entity(new OpActionRequest("cancel"), MediaType.APPLICATION_JSON_TYPE))
@@ -80,7 +78,7 @@ class OperationsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper
   }
 
   test("get result set metadata") {
-    val opHandleStr = getOpHandleStr(OperationType.EXECUTE_STATEMENT)
+    val opHandleStr = getOpHandleStr()
     checkOpState(opHandleStr, FINISHED)
     val response = webTarget.path(s"api/v1/operations/$opHandleStr/resultsetmetadata")
       .request(MediaType.APPLICATION_JSON_TYPE).get()
@@ -90,7 +88,7 @@ class OperationsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper
   }
 
   test("get operation log") {
-    val opHandleStr = getOpHandleStr(OperationType.EXECUTE_STATEMENT)
+    val opHandleStr = getOpHandleStr()
     checkOpState(opHandleStr, FINISHED)
     val response = webTarget.path(
       s"api/v1/operations/$opHandleStr/log")
@@ -103,8 +101,7 @@ class OperationsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper
   }
 
   test("test get result row set") {
-    val opHandleStr =
-      getOpHandleStr(OperationType.EXECUTE_STATEMENT, "select \"test\", 1, 0.32d, true")
+    val opHandleStr = getOpHandleStr("select \"test\", 1, 0.32d, true")
     checkOpState(opHandleStr, FINISHED)
     val response = webTarget.path(
       s"api/v1/operations/$opHandleStr/rowset")
@@ -117,7 +114,7 @@ class OperationsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper
     assert(logRowSet.getRowCount == 1)
   }
 
-  def getOpHandleStr(typ: OperationType, statement: String = "show tables"): String = {
+  def getOpHandleStr(statement: String = "show tables"): String = {
     val sessionHandle = fe.be.openSession(
       HIVE_CLI_SERVICE_PROTOCOL_V2,
       "admin",
@@ -125,13 +122,14 @@ class OperationsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper
       "localhost",
       Map("testConfig" -> "testValue"))
 
-    val op = typ match {
-      case OperationType.EXECUTE_STATEMENT =>
+    val op =
+      if (statement.nonEmpty) {
         fe.be.executeStatement(sessionHandle, statement, Map.empty, runAsync = true, 3000)
-      case OperationType.GET_CATALOGS => fe.be.getCatalogs(sessionHandle)
-    }
+      } else {
+        fe.be.getCatalogs(sessionHandle)
+      }
 
-    s"${op.identifier}|${op.typ.toString}"
+    op.identifier.toString
   }
 
   private def checkOpState(opHandleStr: String, state: OperationState): Unit = {
diff --git a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/SessionsResourceSuite.scala b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/SessionsResourceSuite.scala
index a00ed723b..daf92b1cd 100644
--- a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/SessionsResourceSuite.scala
+++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/SessionsResourceSuite.scala
@@ -26,7 +26,7 @@ import scala.collection.JavaConverters._
 import org.apache.kyuubi.{KyuubiFunSuite, RestFrontendTestHelper}
 import org.apache.kyuubi.client.api.v1.dto._
 import org.apache.kyuubi.events.KyuubiSessionEvent
-import org.apache.kyuubi.operation.{OperationHandle, OperationType}
+import org.apache.kyuubi.operation.OperationHandle
 
 class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {
 
@@ -184,20 +184,20 @@ class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {
       .post(Entity.entity(statementReq, MediaType.APPLICATION_JSON_TYPE))
     assert(200 == response.getStatus)
     var operationHandle = response.readEntity(classOf[OperationHandle])
-    assert(operationHandle.typ == OperationType.EXECUTE_STATEMENT)
+    assert(operationHandle !== null)
 
     response = webTarget.path(s"$pathPrefix/operations/typeInfo").request()
       .post(Entity.entity(null, MediaType.APPLICATION_JSON_TYPE))
     assert(200 == response.getStatus)
     operationHandle = response.readEntity(classOf[OperationHandle])
-    assert(operationHandle.typ == OperationType.GET_TYPE_INFO)
+    assert(operationHandle !== null)
 
     response = webTarget.path(s"$pathPrefix/operations/catalogs")
       .request(MediaType.APPLICATION_JSON_TYPE)
       .post(Entity.entity(null, MediaType.APPLICATION_JSON_TYPE))
     assert(200 == response.getStatus)
     operationHandle = response.readEntity(classOf[OperationHandle])
-    assert(operationHandle.typ == OperationType.GET_CATALOGS)
+    assert(operationHandle !== null)
 
     val getSchemasReq = new GetSchemasRequest("spark_catalog", "default")
     response = webTarget.path(s"$pathPrefix/operations/schemas")
@@ -205,7 +205,7 @@ class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {
       .post(Entity.entity(getSchemasReq, MediaType.APPLICATION_JSON_TYPE))
     assert(200 == response.getStatus)
     operationHandle = response.readEntity(classOf[OperationHandle])
-    assert(operationHandle.typ == OperationType.GET_SCHEMAS)
+    assert(operationHandle !== null)
 
     val tableTypes = new util.ArrayList[String]()
     val getTablesReq = new GetTablesRequest("spark_catalog", "default", "default", tableTypes)
@@ -214,13 +214,13 @@ class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {
       .post(Entity.entity(getTablesReq, MediaType.APPLICATION_JSON_TYPE))
     assert(200 == response.getStatus)
     operationHandle = response.readEntity(classOf[OperationHandle])
-    assert(operationHandle.typ == OperationType.GET_TABLES)
+    assert(operationHandle !== null)
 
     response = webTarget.path(s"$pathPrefix/operations/tableTypes").request()
       .post(Entity.entity(null, MediaType.APPLICATION_JSON_TYPE))
     assert(200 == response.getStatus)
     operationHandle = response.readEntity(classOf[OperationHandle])
-    assert(operationHandle.typ == OperationType.GET_TABLE_TYPES)
+    assert(operationHandle !== null)
 
     val getColumnsReq = new GetColumnsRequest("spark_catalog", "default", "default", "default")
     response = webTarget.path(s"$pathPrefix/operations/columns")
@@ -228,7 +228,7 @@ class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {
       .post(Entity.entity(getColumnsReq, MediaType.APPLICATION_JSON_TYPE))
     assert(200 == response.getStatus)
     operationHandle = response.readEntity(classOf[OperationHandle])
-    assert(operationHandle.typ == OperationType.GET_COLUMNS)
+    assert(operationHandle !== null)
 
     val getFunctionsReq = new GetFunctionsRequest("default", "default", "default")
     response = webTarget.path(s"$pathPrefix/operations/functions")
@@ -236,7 +236,7 @@ class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {
       .post(Entity.entity(getFunctionsReq, MediaType.APPLICATION_JSON_TYPE))
     assert(200 == response.getStatus)
     operationHandle = response.readEntity(classOf[OperationHandle])
-    assert(operationHandle.typ == OperationType.GET_FUNCTIONS)
+    assert(operationHandle !== null)
 
     val getPrimaryKeysReq = new GetPrimaryKeysRequest("spark_catalog", "default", "default")
     response = webTarget.path(s"$pathPrefix/operations/primaryKeys")