-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: preserve column qualifier for DataFrame::with_column
#7792
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also test t1
self join
Added. Thank you for reviewing @comphead . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Test issue: https://github.com/apache/arrow-datafusion/issues/7790 | ||
// The join operation outputs two identical column names, but they belong to different relations. | ||
#[tokio::test] | ||
async fn with_column_join_same_columns() -> Result<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified this fails with
Error: SchemaError(AmbiguousReference { field: Column { relation: None, name: "c1" } })
Without the code change on this branch.
Which issue does this PR close?
Closes #7790.
Rationale for this change
The join operation produced two columns with identical names, but they belong to different relations.
We should preserve the relation names to distinguish between them.
What changes are included in this PR?
Are these changes tested?
Yes
Are there any user-facing changes?
No