You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/09/08 17:42:08 UTC
[GitHub] [incubator-kyuubi] cxzl25 commented on a diff in pull request #3439: [KYUUBI #3435] Command should not execute when plan only mode is set to PHYSICAL or EXECUTION
cxzl25 commented on code in PR #3439:
URL: https://github.com/apache/incubator-kyuubi/pull/3439#discussion_r966250891
##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/PlanOnlyStatement.scala:
##########
@@ -107,10 +108,15 @@ class PlanOnlyStatement(
SQLConf.get.maxToStringFields,
printOperatorId = false))))
case PhysicalMode =>
- val physical = spark.sql(statement).queryExecution.sparkPlan
+ val analyzed = spark.sessionState.analyzer.execute(plan)
+ spark.sessionState.analyzer.checkAnalysis(analyzed)
+ val physical = spark.sessionState.executePlan(analyzed, CommandExecutionMode.SKIP).sparkPlan
Review Comment:
Is it better to use optimizedPlan here?
```scala
val optimized = spark.sessionState.optimizer.execute(analyzed)
```
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org