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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]