-
- Downloads
[SPARK-21238][SQL] allow nested SQL execution
## What changes were proposed in this pull request? This is kind of another follow-up for https://github.com/apache/spark/pull/18064 . In #18064 , we wrap every SQL command with SQL execution, which makes nested SQL execution very likely to happen. #18419 trid to improve it a little bit, by introduing `SQLExecition.ignoreNestedExecutionId`. However, this is not friendly to data source developers, they may need to update their code to use this `ignoreNestedExecutionId` API. This PR proposes a new solution, to just allow nested execution. The downside is that, we may have multiple executions for one query. We can improve this by updating the data organization in SQLListener, to have 1-n mapping from query to execution, instead of 1-1 mapping. This can be done in a follow-up. ## How was this patch tested? existing tests. Author: Wenchen Fan <wenchen@databricks.com> Closes #18450 from cloud-fan/execution-id.
Showing
- sql/core/src/main/scala/org/apache/spark/sql/execution/SQLExecution.scala 19 additions, 69 deletions...n/scala/org/apache/spark/sql/execution/SQLExecution.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/command/AnalyzeTableCommand.scala 1 addition, 3 deletions...che/spark/sql/execution/command/AnalyzeTableCommand.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/command/cache.scala 7 additions, 9 deletions.../scala/org/apache/spark/sql/execution/command/cache.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala 1 addition, 3 deletions...e/spark/sql/execution/datasources/csv/CSVDataSource.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRelation.scala 3 additions, 5 deletions...e/spark/sql/execution/datasources/jdbc/JDBCRelation.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/console.scala 4 additions, 8 deletions...la/org/apache/spark/sql/execution/streaming/console.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/memory.scala 15 additions, 17 deletions...ala/org/apache/spark/sql/execution/streaming/memory.scala
- sql/core/src/test/scala/org/apache/spark/sql/execution/SQLExecutionSuite.scala 0 additions, 24 deletions...la/org/apache/spark/sql/execution/SQLExecutionSuite.scala
Loading
Please register or sign in to comment