Skip to content

Indices are now identified by exact name#2476

Merged
mattdowle merged 1 commit intomasterfrom
indexBugFix
Nov 13, 2017
Merged

Indices are now identified by exact name#2476
mattdowle merged 1 commit intomasterfrom
indexBugFix

Conversation

@MarkusBonsch
Copy link
Copy Markdown
Contributor

@MarkusBonsch MarkusBonsch commented Nov 11, 2017

Closes #2465.

Simply added the exact = TRUE to
the line where indices are identified:
xo = attr(attr(x, 'index'), idxName, exact = TRUE)
This implies the following changes:

  • It prevents an index test from accidentally being used for column test_col.
  • It prevents changed row order after joins if the index that was used for the join contained more columns than were joined on, e.g. Index on x and y but join only on x. With the bugfix, the x__y index is not used anymore for joins on x only.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Nov 11, 2017

Codecov Report

Merging #2476 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2476   +/-   ##
=======================================
  Coverage   91.57%   91.57%           
=======================================
  Files          63       63           
  Lines       12039    12039           
=======================================
  Hits        11025    11025           
  Misses       1014     1014
Impacted Files Coverage Δ
R/data.table.R 97.16% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 214d830...7e6a195. Read the comment docs.

@st-pasha st-pasha requested review from mattdowle and removed request for st-pasha November 12, 2017 06:04
@mattdowle mattdowle merged commit e334ed1 into master Nov 13, 2017
@mattdowle mattdowle deleted the indexBugFix branch November 13, 2017 21:02
@mattdowle mattdowle added this to the v1.10.6 milestone Nov 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Join with index delivers unexpected results if indexed column name is a prefix of the join column name

3 participants