Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-yzou committed Nov 20, 2024
1 parent f8a7918 commit 9b0df9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@

- Improve np.where with scalar x value by eliminating unnecessary join and temp table creation.
- Improve get_dummies performance by flattening the pivot with join.
- Improve align performance when align on row position column by removing unnecessary window functions.
- Improve align performance when aligning on row position column by removing unnecessary window functions.



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1560,18 +1560,18 @@ def align(
extra_columns_to_append.append(col_matching_expr)

# Define the final ordering column.
# As we mentioned in docstring, when left_on_cols and right_on_cols matches, the left
# and right frame is merged row by row with the original order, and the row order of
# As we mentioned in docstring, when left_on_cols and right_on_cols match, the left
# and right frames are merged row by row with the original order, and the row order of
# original frame is retained.
# However, when left_on_cols and right_on_cols doesn't match, we need to sort lexicographically
# However, when left_on_cols and right_on_cols don't match, we need to sort lexicographically
# on the join keys for `outer` align, and preserve left order followed by right order for `left` align.
# This means the ordering column changes based on the result of column matching situation. Due
# to lazy evaluation, we do not know the column matching situation util the query is evaluated.
# In order to achieve this, we add a column 'ordering_col' which is set to left row position if
# input frames have matching left_on_cols and right_on_cols, otherwise this will be set to constant
# 1 (a dummy ordering column has no effect).
# Note that this is only needed by `outer` methods because it needs to sort on join keys. For `left`,
# preserve the left order followed by right order can give the correct order for both matching case
# preserving the left order followed by right order can give the correct order for both matching case
# and non-matching case.
if how == "outer":
global_order_col_identifier = (
Expand Down

0 comments on commit 9b0df9c

Please sign in to comment.