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

self-join followed by a projection with duplicated names results in panic #671

Closed
jimexist opened this issue Jul 4, 2021 · 1 comment · Fixed by #605
Closed

self-join followed by a projection with duplicated names results in panic #671

jimexist opened this issue Jul 4, 2021 · 1 comment · Fixed by #605
Labels
bug Something isn't working

Comments

@jimexist
Copy link
Member

jimexist commented Jul 4, 2021

Describe the bug
A clear and concise description of what the bug is.

this is most likely on how we deal with self-joins

To Reproduce
Steps to reproduce the behavior:

SELECT
  t1.c9, t2.c9
FROM test t1
INNER JOIN test t2
ON t1.c9 = t2.c9;
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', ~/.cargo/registry/src/github.com-1ecc6299db9ec823/arrow-4.4.0/src/datatypes/schema.rs:165:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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

this would work in Postgres

Additional context
Add any other context about the problem here.

@jimexist jimexist added the bug Something isn't working label Jul 4, 2021
@houqp
Copy link
Member

houqp commented Jul 4, 2021

This should be fixed by #605

>  CREATE EXTERNAL TABLE test(c9 int)
STORED AS CSV
LOCATION '/tmp/foo.csv';
0 rows in set. Query took 0.000 seconds.
> SELECT
  t1.c9, t2.c9
FROM test t1
INNER JOIN test t2
ON t1.c9 = t2.c9;
+----+----+
| c9 | c9 |
+----+----+
| 4  | 4  |
| 3  | 3  |
| 1  | 1  |
| 2  | 2  |
+----+----+
4 rows in set. Query took 0.021 seconds.

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

Successfully merging a pull request may close this issue.

2 participants