Date, IDate, and POSIXct should be distinct classes for joins

Open
#6,628 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
data

Research direction

Start by examining the existing mergeType behavior and the join compatibility table linked from #6627. Read the context in #3506, #6602, and #6627 to determine how Date, IDate, and POSIXct should be treated as separate cases. Done means the join behavior follows the agreed compatibility rules and the referenced issues are addressed.

Written by the indexing model from the issue text.

Description

IDate/ITime

I think we should implement mergeType returning I?Date, POSIXct as separate cases. That would for example solve #3506 and could make the solution here clearer.

Originally posted by @MichaelChirico in https://github.com/Rdatatable/data.table/issues/6603#issuecomment-2504992807

#6602 highlights difficulty with our current approach of ignoring column class attributes for well-known classes. We already cater for two very common classes (factor and integer64); I see no reason to treat Date, POSIXct any differently.

Solving this would also solve #3506 with more generality. We should also keep #6627 (in particular the linked "join compatibility table") in mind.

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.