paddyhoran opened a new issue, #3639:
URL: https://github.com/apache/arrow-datafusion/issues/3639

   **Describe the bug**
   I am trying to get a very basic LEFT JOIN to work and I cannot.
   
   **To Reproduce**
   I may be mistaken but I believe this SQL should work:
   ```sql
   -- create left table
   create table t1_1 as select 1 as a, 4 as b;
   create table t1_2 as select 1 as a, 5 as b;
   create table t1 as
       select * from t1_1
       union all
       select * from t1_2;
   
   -- create right table
   create table t2 as select 1 as aa, 10 as c;
   
   -- join
   select * from t2 left join t1 t2 on t2.aa = t1.a
   ```
   
   **Additional context**
   Also, the error message seems to list all fields as members of the `t2` 
table:
   ```
   SchemaError(FieldNotFound { qualifier: Some("t1"), name: "a", valid_fields: 
Some(["t2.aa", "t2.c", "t2.a", "t2.b"]) })
   ```
   
   I ran into this with views but could reproduce with tables.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to