You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "comphead (via GitHub)" <gi...@apache.org> on 2025/09/07 15:58:28 UTC

[I] Create DDL Command `DESCRIBE/EXPLAIN/SHOW` [datafusion]

comphead opened a new issue, #17466:
URL: https://github.com/apache/datafusion/issues/17466

   (no comment)


-- 
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: github-unsubscribe@datafusion.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Create DDL Command `DESCRIBE/EXPLAIN/SHOW` [datafusion]

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on issue #17466:
URL: https://github.com/apache/datafusion/issues/17466#issuecomment-3448729931

   cc @djanderson as working on #18234 
   
   The idea is to output Spark like tree view schema representation 
   


-- 
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: github-unsubscribe@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Create DDL Command `DESCRIBE/EXPLAIN/SHOW` [datafusion]

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on issue #17466:
URL: https://github.com/apache/datafusion/issues/17466#issuecomment-3271655597

   > Maybe we can follow the model of whatever system that comes from 🤔
   
   The closest is `DESCRIBE query` like DuckDB does, 
   
   Apache Spark uses a dataframe API method like 
   
   ```
   spark.sql("select 1").printSchema()
   ``` 
   which doesn't seem usable in SQL context which more fits to DataFusion. Other major query engines doesn't support this functionality. Therefore I'll probably start with DuckDb's `DESCRIBE query` if no other suggestions 


-- 
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: github-unsubscribe@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Create DDL Command `DESCRIBE/EXPLAIN/SHOW` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #17466:
URL: https://github.com/apache/datafusion/issues/17466#issuecomment-3270675171

   We already use `describe foo` for table schema
   
   ```
   DataFusion CLI v49.0.2
   > create table foo (x int) as values (1);
   0 row(s) fetched.
   Elapsed 0.033 seconds.
   
   > describe foo;
   +-------------+-----------+-------------+
   | column_name | data_type | is_nullable |
   +-------------+-----------+-------------+
   | x           | Int32     | YES         |
   +-------------+-----------+-------------+
   1 row(s) fetched.
   Elapsed 0.006 seconds.
   ```
   
   Describe appears to be an alias of explain:
   
   ```sql
   > describe  select x+1 from foo;
   +---------------+-------------------------------+
   | plan_type     | plan                          |
   +---------------+-------------------------------+
   | physical_plan | ┌───────────────────────────┐ |
   |               | │       ProjectionExec      │ |
   |               | │    --------------------   │ |
   |               | │     foo.x + Int64(1):     │ |
   |               | │    CAST(x AS Int64) + 1   │ |
   |               | └─────────────┬─────────────┘ |
   |               | ┌─────────────┴─────────────┐ |
   |               | │       DataSourceExec      │ |
   |               | │    --------------------   │ |
   |               | │         bytes: 112        │ |
   |               | │       format: memory      │ |
   |               | │          rows: 1          │ |
   |               | └───────────────────────────┘ |
   |               |                               |
   +---------------+-------------------------------+
   1 row(s) fetched.
   Elapsed 0.001 seconds.
   ```
   
   Maybe we can follow the model of whatever system that comes from 🤔 
   


-- 
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: github-unsubscribe@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org