Skip to content

[Repo Assist] Make Frame.joinOn parameter order consistent with Frame.join — closes #154#663

Merged
dsyme merged 2 commits intomasterfrom
repo-assist/fix-issue-154-joinOn-param-order-e1eed0df9247b2c0
Mar 19, 2026
Merged

[Repo Assist] Make Frame.joinOn parameter order consistent with Frame.join — closes #154#663
dsyme merged 2 commits intomasterfrom
repo-assist/fix-issue-154-joinOn-param-order-e1eed0df9247b2c0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Repo Assist — implementing the Frame.joinOn consistency fix requested by @dsyme in #154.

Problem

Frame.join and Frame.joinAlign both take kind as their first parameter, so callers can naturally write:

df1 |> Frame.join JoinKind.Left df2
df1 |> Frame.joinAlign JoinKind.Left Lookup.Exact df2

But Frame.joinOn, Frame.joinOnString, and Frame.joinOnInt had the order reversed (colKey before kind):

// Before — inconsistent with Frame.join
df1 |> Frame.joinOnString "PersonId" JoinKind.Left df2

This was surprising and made the three functions feel like second-class citizens compared to the rest of the join family.

Fix

Swap the parameters so kind comes first in all three functions, matching join:

// After — consistent with Frame.join
df1 |> Frame.joinOnString JoinKind.Left "PersonId" df2
df1 |> Frame.joinOnInt    JoinKind.Inner "id"       df2
df1 |> Frame.joinOn       JoinKind.Outer "key"      df2  // (inferred key type)
```

## Changes

- **`FrameModule.fs`**: swap `colKey`/`kind` in `joinOn`, `joinOnString`, `joinOnInt`; update `(param)` doc order to match.
- **`tests/Deedle.Tests/Frame.fs`**: update all call sites to the new parameter order; add a `JoinKind.Right` test for `joinOnString` and a `JoinKind.Outer` test for `joinOnInt` to give full four-way JoinKind coverage.

## Test Status

```
Passed!  - Failed: 0, Passed: 672, Skipped: 0, Total: 672

All 672 tests pass (2 new tests added).

Generated by Repo Assist for issue #154 ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@30f2254f2a7a944da1224df45d181a3f8faefd0d

…154

Frame.join and Frame.joinAlign both take `kind` as their first parameter.
Frame.joinOn, joinOnString, and joinOnInt had the order reversed (`colKey`
before `kind`), making them inconsistent and surprising for callers who
compose them with the other join operators.

This commit swaps the parameters so all three functions now follow the
same convention as `join`:

  // Before (inconsistent)
  Frame.joinOnString "id" JoinKind.Inner left right

  // After (consistent with Frame.join)
  Frame.joinOnString JoinKind.Inner "id" left right

Changes:
- FrameModule.fs: swap `colKey`/`kind` in joinOn, joinOnString, joinOnInt
- Frame.fs (tests): update all call sites to new parameter order
- Frame.fs (tests): add right-join test for joinOnString and outer-join
  test for joinOnInt to give full coverage of all four JoinKind values

Co-authored-by: Copilot <[email protected]>
@dsyme dsyme marked this pull request as ready for review March 19, 2026 01:53
@dsyme dsyme merged commit 5dea444 into master Mar 19, 2026
2 checks passed
@dsyme dsyme deleted the repo-assist/fix-issue-154-joinOn-param-order-e1eed0df9247b2c0 branch March 19, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add merge functionality between data frames

1 participant