You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "vincev (via GitHub)" <gi...@apache.org> on 2023/02/13 16:51:22 UTC
[GitHub] [arrow-datafusion] vincev commented on pull request #5214: Add support to SQL parser for unnest function.
vincev commented on PR #5214:
URL: https://github.com/apache/arrow-datafusion/pull/5214#issuecomment-1428279764
Just found a problem while adding more tests, if I run the following:
```rust
let ctx = SessionContext::new();
ctx.sql("create external table shapes stored as parquet location 'nested.parquet'").await?;
ctx.sql("select count(unnest(tags)) from shapes").await?.show().await;
```
I get the correct output:
```
+--------------------+
| COUNT(shapes.tags) |
+--------------------+
| 8 |
+--------------------+
```
but if I run the same query with `register_parquet`:
```rust
let ctx = SessionContext::new();
let df = ctx.register_parquet("shapes", "nested.parquet", ParquetReadOptions::default()).await?;
ctx.sql("select count(unnest(tags)) from shapes").await?.show().await;
```
the `UnnestExec` gets optimized away somehow (its execute is not called) and I get this:
```
+--------------------+
| COUNT(shapes.tags) |
+--------------------+
| 4 |
+--------------------+
```
I'll investigate.
--
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