You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/18 19:03:33 UTC
[GitHub] [arrow-datafusion] retikulum commented on issue #3873: Default physical planner generates empty relation for DROP TABLE, CREATE MEMORY TABLE, etc
retikulum commented on issue #3873:
URL: https://github.com/apache/arrow-datafusion/issues/3873#issuecomment-1282875294
Hi. This seems interesting however when I try to produce the difference between `drop table foo` and `CREATE EXTERNAL TABLE`, they both output the same output. What did I do wrong? Output is the following:
```
++
++
```
My code for `CREATE EXTERNAL TABLE`:
```rust
use datafusion::error::Result;
use datafusion::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
// create local execution context
let ctx = SessionContext::new();
// execute the query
let df = ctx
.sql("CREATE EXTERNAL TABLE foo stored as parquet location \"test.parquet\"")
.await?;
// print the results
df.show().await?;
Ok(())
}
```
My code for `drop table test`:
```rust
use datafusion::error::Result;
use datafusion::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
// create local execution context
let ctx = SessionContext::new();
// register parquet file with the execution context
ctx.register_parquet(
"test",
"test.parquet",
ParquetReadOptions::default(),
)
.await?;
// execute the query
let df = ctx
.sql("drop table test")
.await?;
// print the results
df.show().await?;
Ok(())
}
```
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org