fix: remove redundant column when using window functions#1236
fix: remove redundant column when using window functions#1236renato2099 wants to merge 1 commit intoapache:mainfrom
Conversation
|
Hi @timsaucer @kosiew , do you think you could please review this small PR? |
8542fc3 to
353b889
Compare
|
hi @renato2099 The changes in this PR replaced DataFrame.with_column with a select-based implementation that filters out the target column and pushes the aliased expression at the end of the projection list. This reorders the DataFrame columns (a, b, c, e, d), leading test_named_struct to fail because it expects the replaced column d to remain in its original position (a, b, c, d, e). Can you amend the code so that the tests pass? |
|
Thank you for the PR. This is a good work around, but I think we should fix it properly in our upstream repo instead. |
|
Would you be willing to look at this in our upstream repository and fix it there? apache/datafusion#17630 |
yeah I was wondering about this myself 😅 but I wasn't sure where the problem was really coming from, so I went for this
for sure! let me take a stab at this |
Which issue does this PR close?
Closes #1234
Rationale for this change
Remove duplicated column when using window functions.
What changes are included in this PR?
Aliasing the window expression at the datafusion-python api such that over in datafusion's
dataframe/mod.rsthe current behavior is still honored.Are there any user-facing changes?
no