Robert Dillitz created SPARK-51818:
--------------------------------------

             Summary: An AnalyzePlanRequest should not eagerly execute analyzed 
SQL commands
                 Key: SPARK-51818
                 URL: https://issues.apache.org/jira/browse/SPARK-51818
             Project: Spark
          Issue Type: Bug
          Components: Connect
    Affects Versions: 3.5.5, 4.0.0, 4.1.0
            Reporter: Robert Dillitz


Sending AnalyzePlanRequests.Schema requests to get the schema of SQL commands 
like [SHOW PARTITIONS 
|https://spark.apache.org/docs/3.5.1/sql-ref-syntax-aux-show-partitions.html]should
 not eagerly execute the command.
{code:java}
root {
  common {
    plan_id: 42
  }
  sql {
    query: "SHOW PARTITIONS main.default.partitioned_table"
  }
}{code}
The current cause for this is that we get the schema through [Dataset.ofRows 
|https://github.com/apache/spark/blob/master/sql/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectAnalyzeHandler.scala#L67]in
 the SparkConnectAnalyzeHandler, which does not set the 
[CommandExecutionMode.SKIP.|https://github.com/apache/spark/blob/2ba156096e83adf7b0b2f5c38453d6fd37d95ded/sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala#L490]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to