bmerge() needs to handle mixed complex-(int,dbl,i64) joins explicitly

Open
#6,627 9 comments 2 reactions 2 assignees View on GitHub

@venom1204 is already working on this.

Since Jun 21, 2025.

Assessment

This issue has not been assessed yet.

Description

internals

Follow-up to #6603.

We have this comment that's currently incorrect:

https://github.com/Rdatatable/data.table/blob/546259ddaba0e8ab1506729113688f85ca2986fd/R/bmerge.R#L100

That's because complex is an ORDERING_TYPE:

https://github.com/Rdatatable/data.table/blob/546259ddaba0e8ab1506729113688f85ca2986fd/R/setkey.R#L150

At a glance, we should:

  1. Treat complex the same as double iff all(Im(x) == 0)
  2. Error if any(Im(x) != 0)

To facilitate spotting this kind of gap in the future, I made this:

Screenshot of table in the spreadsheet linked below

Spreadsheet: https://docs.google.com/spreadsheets/d/1RhNhXRA_5frgeqF9_ZS0Sll94RVs0iFgb5u7DBrgpaQ/edit?usp=sharing

@tdhock, what do you think would be a good place to keep this table as documentation? The joins vignette?

Dominant language
R
Stars
3.9k
Forks
1.1k
Avg merge
14h 4m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Rdatatable/data.table

All issues in Rdatatable/data.table

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.