-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
bugSomething isn't workingSomething isn't workingsubstraitChanges to the substrait crateChanges to the substrait crate
Description
Describe the bug
SQLs like these will fail:
SELECT a as alias_a, a FROM data;or
SELECT a as alias_a FROM data ORDER BY a;The error message looks like
Error: Plan("Projections require unique expression names but the expression \"data.a\" at position 0 and \"data.a\" at position 1 have the same name. Consider aliasing (\"AS\") one of them.")
To Reproduce
Adding case in datafusion/substrait/tests/roundtrip_logical_plan.rs like:
#[tokio::test]
async fn roundtrip_alias_in_projection() -> Result<()> {
roundtrip("SELECT a as alias_a, a FROM data").await
}Expected behavior
It should generate correct LogicalPlan without error
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingsubstraitChanges to the substrait crateChanges to the substrait crate