alamb commented on code in PR #7291:
URL: https://github.com/apache/arrow-datafusion/pull/7291#discussion_r1296197868


##########
datafusion/sql/src/parser.rs:
##########
@@ -44,6 +44,35 @@ fn parse_file_type(s: &str) -> Result<String, ParserError> {
     Ok(s.to_uppercase())
 }
 
+/// DataFusion specific EXPLAIN (needed so we can EXPLAIN datafusion

Review Comment:
   This is the key thing -- we need a datafusion specific `EXPLAIN` statement



##########
datafusion/sqllogictest/test_files/copy.slt:
##########
@@ -25,12 +25,19 @@ COPY source_table TO 'test_files/scratch/table' (format 
parquet, per_thread_outp
 ----
 2
 
-#Explain copy queries not currently working
-query error DataFusion error: This feature is not implemented: Unsupported SQL 
statement: Some\("COPY source_table TO 'test_files/scratch/table'"\)
+# Error case
+query error DataFusion error: Error during planning: Copy To format not 
explicitly set and unable to get file extension!
 EXPLAIN COPY source_table to 'test_files/scratch/table'
 
-query error DataFusion error: SQL error: ParserError\("Expected end of 
statement, found: source_table"\)
+query TT
 EXPLAIN COPY source_table to 'test_files/scratch/table' (format parquet, 
per_thread_output true)
+----

Review Comment:
   Here is an example of the explain plan working



##########
datafusion/sqllogictest/test_files/explain.slt:
##########
@@ -101,13 +101,17 @@ set datafusion.explain.physical_plan_only = false
 
 
 ## explain nested
-statement error Explain must be root of the plan
+query error DataFusion error: Error during planning: Nested explain not 
supported

Review Comment:
   I think these errors are a little more clear



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to