kyuubi icon indicating copy to clipboard operation
kyuubi copied to clipboard

[BUG] Command should not execute when plan only mode is set to PHYSICAL or EXECUTION

Open lsm1 opened this issue 3 years ago • 0 comments

Code of Conduct

Search before asking

  • [X] I have searched in the issues and found no similar issues.

Describe the bug

      case PhysicalMode =>
        val physical = spark.sql(statement).queryExecution.sparkPlan
        iter = new IterableFetchIterator(Seq(Row(physical.toString())))
      case ExecutionMode =>
        val executed = spark.sql(statement).queryExecution.executedPlan 
        iter = new IterableFetchIterator(Seq(Row(executed.toString())))

when kyuubi.operation.plan.only.mode is set to PHYSICAL or EXECUTION, we get plan from queryExecution, both sparkPlan and executedPlan will call assertCommandExecuted() , the Command plan such as DropTableCommand will execute

Affects Version(s)

master

Kyuubi Server Log Output

No response

Kyuubi Engine Log Output

No response

Kyuubi Server Configurations

No response

Kyuubi Engine Configurations

No response

Additional context

No response

Are you willing to submit PR?

  • [X] Yes I am willing to submit a PR!

lsm1 avatar Sep 07 '22 08:09 lsm1