[GitHub] [spark] beliefer commented on a change in pull request #32513: [SPARK-35378][SQL] Convert LeafRunnableCommand to LocalRelation when query with CTE

2021-05-13 Thread GitBox


beliefer commented on a change in pull request #32513:
URL: https://github.com/apache/spark/pull/32513#discussion_r632268442



##
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala
##
@@ -71,7 +72,15 @@ class QueryExecution(
 
   lazy val analyzed: LogicalPlan = executePhase(QueryPlanningTracker.ANALYSIS) 
{
 // We can't clone `logical` here, which will reset the `_analyzed` flag.
-sparkSession.sessionState.analyzer.executeAndCheck(logical, tracker)
+sparkSession.sessionState.analyzer.executeAndCheck(logical, tracker) match 
{
+  case c: Command => c

Review comment:
   OK. Let's unify the behavior eagerly execute the commands.




-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] beliefer commented on a change in pull request #32513: [SPARK-35378][SQL] Convert LeafRunnableCommand to LocalRelation when query with CTE

2021-05-13 Thread GitBox


beliefer commented on a change in pull request #32513:
URL: https://github.com/apache/spark/pull/32513#discussion_r632267184



##
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala
##
@@ -71,7 +72,15 @@ class QueryExecution(
 
   lazy val analyzed: LogicalPlan = executePhase(QueryPlanningTracker.ANALYSIS) 
{
 // We can't clone `logical` here, which will reset the `_analyzed` flag.
-sparkSession.sessionState.analyzer.executeAndCheck(logical, tracker)
+sparkSession.sessionState.analyzer.executeAndCheck(logical, tracker) match 
{
+  case c: Command => c

Review comment:
   I want to maintain the Command here and ensure its behavior.




-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org