Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot query external table - TableScan replaced with EmptyExec #4027

Closed
andygrove opened this issue Oct 29, 2022 · 1 comment
Closed

Cannot query external table - TableScan replaced with EmptyExec #4027

andygrove opened this issue Oct 29, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@andygrove
Copy link
Member

Describe the bug
I am using the CLI to try and query a file. It shows that the file has no data but this is not the case.

To Reproduce

create external table partsupp (ps_partkey int, ps_suppkey int, ps_availqty int, ps_supplycost float, ps_comment varchar) stored as csv with delimiter '|' location '../benchmarks/data/partsupp.tbl';

❯ select count(*) from partsupp;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 0               |
+-----------------+
1 row in set. Query took 0.001 seconds.
explain verbose select count(*) from partsupp;
| logical_plan                                               | Projection: COUNT(UInt8(1))                                     |
|                                                            |   Aggregate: groupBy=[[]], aggr=[[COUNT(UInt8(1))]]             |
|                                                            |     TableScan: partsupp projection=[ps_partkey]                 |
| initial_physical_plan                                      | ProjectionExec: expr=[COUNT(UInt8(1))@0 as COUNT(UInt8(1))]     |
|                                                            |   AggregateExec: mode=Final, gby=[], aggr=[COUNT(UInt8(1))]     |
|                                                            |     AggregateExec: mode=Partial, gby=[], aggr=[COUNT(UInt8(1))] |
|                                                            |       EmptyExec: produce_one_row=false     

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

@andygrove andygrove added the bug Something isn't working label Oct 29, 2022
@tustvold
Copy link
Contributor

Looks like a duplicate of #1736

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants