You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wang Shuo (Jira)" <ji...@apache.org> on 2021/03/26 06:15:00 UTC

[jira] [Updated] (SPARK-34873) Avoid wrapped in withNewExecutionId twice when run SQL with side effects

     [ https://issues.apache.org/jira/browse/SPARK-34873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wang Shuo updated SPARK-34873:
------------------------------
    Description: 
In the current code, a `QueryExecution` will be wrapped in `SQLExecution.withNewExecutionId` twice when run SQL with side effects.

To reproduce:

Run SQLs below in spark-sql
{code:java}
spark-sql> CREATE TABLE t AS SELECT 1 AS i;
spark-sql> SELECT * FROM t;
spark-sql> DROP TABLE t;

{code}
we will see duplicate SQL queries in Spark UI (in attachments)

  was:
In the current code, a `QueryExecution` will be wrapped in `SQLExecution.withNewExecutionId` twice when run SQL with side effects.

To reproduce:

Run SQLs below in spark-sql
{code:java}
spark-sql> CREATE TABLE t AS SELECT 1 AS i;
spark-sql> SELECT * FROM t;
spark-sql> DROP TABLE t;

{code}
we will see duplicate SQL queries in Spark UI:

!image-2021-03-26-14-13-29-381.png!


> Avoid wrapped in withNewExecutionId twice when run SQL with side effects
> ------------------------------------------------------------------------
>
>                 Key: SPARK-34873
>                 URL: https://issues.apache.org/jira/browse/SPARK-34873
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: Wang Shuo
>            Priority: Major
>         Attachments: 0F9E09B0-7FAF-4424-9C11-66930F1BBB7B.png
>
>
> In the current code, a `QueryExecution` will be wrapped in `SQLExecution.withNewExecutionId` twice when run SQL with side effects.
> To reproduce:
> Run SQLs below in spark-sql
> {code:java}
> spark-sql> CREATE TABLE t AS SELECT 1 AS i;
> spark-sql> SELECT * FROM t;
> spark-sql> DROP TABLE t;
> {code}
> we will see duplicate SQL queries in Spark UI (in attachments)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org