You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/28 20:23:41 UTC

[GitHub] [arrow-datafusion] andygrove opened a new issue, #2372: Duplicate qualified field in complex SQL with CTE, alias, and join

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

   **Describe the bug**
   See the test case below
   
   **To Reproduce**
   ``` rust
   #[tokio::test]
   async fn query_cte_with_alias() -> Result<()> {
       let ctx = SessionContext::new();
       let schema = Schema::new(vec![
           Field::new("id", DataType::Int16, false),
           Field::new("a", DataType::Int16, false),
       ]);
       let empty_table = Arc::new(EmptyTable::new(Arc::new(schema)));
       ctx.register_table("t1", empty_table)?;
       let sql = "with \
           v1 as (select * from t1), \
           v2 as (select * from v1, v1 v1a, v1 v1b where v1a.id = v1.id - 1 and v1b.id = v1.id + 1) \
           select * from v2";
       let actual = execute_to_batches(&ctx, sql).await;
       let expected = vec![
           "+----------+",
           "| Int64(1) |",
           "+----------+",
           "| 1        |",
           "+----------+",
       ];
       assert_batches_eq!(expected, &actual);
       Ok(())
   }
   ```
   
   Fails with:
   
   ```
   Schema contains duplicate qualified field name 'v1.id'
   ```
   
   **Expected behavior**
   Should not fail
   
   **Additional context**
   None
   


-- 
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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] andygrove closed issue #2372: Duplicate qualified field in complex SQL with CTE, alias, and join

Posted by GitBox <gi...@apache.org>.
andygrove closed issue #2372: Duplicate qualified field in complex SQL with CTE, alias, and join
URL: https://github.com/apache/arrow-datafusion/issues/2372


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org