Skip to content

Commit

Permalink
Merge pull request #64 from waitingkuo/issue-3002
Browse files Browse the repository at this point in the history
add a simple test case
  • Loading branch information
andygrove authored Aug 1, 2022
2 parents 2f84746 + 3093654 commit 475623e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions datafusion/core/tests/sql/projection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,3 +335,16 @@ fn assert_fields_eq(plan: &LogicalPlan, expected: Vec<&str>) {
.collect();
assert_eq!(actual, expected);
}

#[tokio::test]
async fn paralleproject_column_with_same_name_as_relationl() -> Result<()> {
let ctx = SessionContext::new();

let sql = "select a.a from (select 1 as a) as a;";
let actual = execute_to_batches(&ctx, sql).await;

let expected = vec!["+---+", "| a |", "+---+", "| 1 |", "+---+"];
assert_batches_sorted_eq!(expected, &actual);

Ok(())
}

0 comments on commit 475623e

Please sign in to comment.