SteNicholas commented on a change in pull request #1967:
URL: https://github.com/apache/incubator-kyuubi/pull/1967#discussion_r813523417
##########
File path:
kyuubi-server/src/test/scala/org/apache/kyuubi/operation/PlanOnlyOperationSuite.scala
##########
@@ -79,31 +81,25 @@ class PlanOnlyOperationSuite extends WithKyuubiServer with
HiveJDBCTestHelper {
}
}
- test("KYUUBI #1920: Plan only operations with Usestatement or
SetNamespaceCommand skiped") {
- withSessionConf()(Map(KyuubiConf.OPERATION_PLAN_ONLY.key ->
NONE.toString))(Map.empty) {
+ test("KYUUBI #1920: Plan only operations with UseStatement or
SetNamespaceCommand") {
+ withSessionConf()(Map(KyuubiConf.OPERATION_PLAN_ONLY_MODE.key ->
NONE.toString))(Map.empty) {
withDatabases("test_database") { statement =>
statement.execute("create database test_database")
- statement.execute(s"set
${KyuubiConf.OPERATION_PLAN_ONLY.key}=optimize")
+ statement.execute(s"set
${KyuubiConf.OPERATION_PLAN_ONLY_MODE.key}=$OPTIMIZE")
val result = statement.executeQuery("use test_database")
assert(!result.next(), "In contrast to PlanOnly mode, it will returns
an empty result")
}
}
}
- test("KYUUBI #1920: Plan only operations with CacheTable skiped") {
- withSessionConf()(Map(KyuubiConf.OPERATION_PLAN_ONLY.key ->
OPTIMIZE.toString))(Map.empty) {
- withJdbcStatement() { statement =>
- val result = statement.executeQuery("cache table cached_table as
select 1")
- assert(!result.next(), "In contrast to PlanOnly mode, it will returns
an empty result")
- }
- }
- }
-
- test("KYUUBI #1920: Plan only operations with CreateViewStatement or
CreateViewCommand skiped") {
- withSessionConf()(Map(KyuubiConf.OPERATION_PLAN_ONLY.key ->
OPTIMIZE.toString))(Map.empty) {
+ test("KYUUBI #1920: Plan only operations with CreateViewStatement or
CreateViewCommand") {
+ withSessionConf()(
+ Map(KyuubiConf.OPERATION_PLAN_ONLY_EXCLUDES.key ->
"CreateViewStatement,CreateViewCommand"))(
+ Map.empty) {
withJdbcStatement() { statement =>
val result = statement.executeQuery("create temp view temp_view as
select 1")
Review comment:
@iodone, using `statement.execute` could drop the `temp_view`, no need
to use `statement.executeQuery` to drop the view.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]