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

Panic while running join datatypes/schema.rs:165:10 #601

Closed
alamb opened this issue Jun 22, 2021 · 1 comment · Fixed by #605
Closed

Panic while running join datatypes/schema.rs:165:10 #601

alamb opened this issue Jun 22, 2021 · 1 comment · Fixed by #605
Labels
bug Something isn't working datafusion Changes in the datafusion crate

Comments

@alamb
Copy link
Contributor

alamb commented Jun 22, 2021

Describe the bug

select * from foo as f1 JOIN foo as f2 ON f1.bar = f2.bar;
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', /Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/arrow-4.3.0/src/datatypes/schema.rs:165:10
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

To Reproduce

echo "1" > /tmp/foo.csv
cargo run -p datafusion-cli 
> CREATE EXTERNAL TABLE foo(bar int)
STORED AS CSV
LOCATION '/tmp/foo.csv';
0 rows in set. Query took 0.000 seconds.
> select * from foo as f1 JOIN foo as f2 ON f1.bar = f2.bar;
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', /Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/arrow-4.3.0/src/datatypes/schema.rs:165:10

Expected behavior
Expected output of 1 row, with columns f1.foo and f2.foo each with value 1

Additional context
Likely follow on work from #55

@alamb alamb added bug Something isn't working datafusion Changes in the datafusion crate labels Jun 22, 2021
@alamb
Copy link
Contributor Author

alamb commented Jun 22, 2021

Interestingly, it seems like f2.bar is causing some issues:

> select f1.bar from foo as f1 JOIN foo as f2 ON f1.bar = f2.bar;
+-----+
| bar |
+-----+
| 1   |
+-----+
1 row in set. Query took 0.020 seconds.
> select f1.bar, f2.bar from foo as f1 JOIN foo as f2 ON f1.bar = f2.bar;
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', /Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/arrow-4.3.0/src/datatypes/schema.rs:165:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

And

> select f2.bar from foo as f1 JOIN foo as f2 ON f1.bar = f2.bar;
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', /Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/arrow-4.3.0/src/datatypes/schema.rs:165:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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

Successfully merging a pull request may close this issue.

1 participant