fix: SQLite joins should be on ImageNumber,TableNumber and not ImageNumber #378
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I had introduced a new cyto_tool (
cell_locations
) in #257.I had missed a crucial aspect of the way the SQLite files are created.
As described in cytomining/CytoTable#30,
ImageNumber
is guaranteed to be unique only within anImage.csv
but not across allImage.csv
files in a dataset. This means that any join between compartment tables and theImage
table must be on both,ImageNumber
andTableNumber
but I was only joining onImageNumber
.Why didn't this fail before? Because I was also creating the test fixtures without
TableNumber
, and this still would work because the majority but not all SQLite files do have uniqueImageNumber
s.I have now fixed
What is the nature of your change?
Checklist
Please ensure that all boxes are checked before indicating that a pull request is ready for review.