Skip to content

The expression to get an indexed field is only valid for List types (common_sub_expression_eliminate) #3002

@andygrove

Description

@andygrove

Describe the bug

I am trying to perform a trivial join in the CLI using latest from master and I get the following error:

Plan("The expression to get an indexed field is only valid for `List` types")

To Reproduce

$ cat /tmp/a.csv
foo
1

$ cat /tmp/b.csv
b
bar

$ ./target/debug/datafusion-cli

DataFusion CLI v10.0.0
❯ create external table a stored as csv with header row location '/tmp/a.csv';
0 rows in set. Query took 0.016 seconds.
❯ create external table b stored as csv with header row location '/tmp/b.csv';
0 rows in set. Query took 0.009 seconds.
❯ select * from a;
+-----+
| foo |
+-----+
| 1   |
+-----+
1 row in set. Query took 0.011 seconds.
❯ select * from b;
+-----+
| b   |
+-----+
| bar |
+-----+
1 row in set. Query took 0.010 seconds.
❯ select * from a join b on a.foo = b.bar;
Plan("The expression to get an indexed field is only valid for `List` types")

Expected behavior
Query should work

Additional context
None

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingoptimizerOptimizer rules

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions