Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in tuple iswhole logic for bulk connections #490

Merged
merged 1 commit into from Nov 8, 2019
Merged

Conversation

leonardt
Copy link
Collaborator

@leonardt leonardt commented Nov 8, 2019

This fixes the case where the compiler improperly tries to do a bulk
connection.

The desired behavior is to check:
is the value connected to the current tuple "whole", which means
that a tuple of the same type is connected to the current tuple,
in this case we can connect the two tuples together, rather than
their components.

However, this check was improperly indicating a bulk connection in the
case when the driving value satisfied all the properties for a whole
tuple, except that it doesn't contain all the keys of the parent tuple.

This change strengthens the check to ensure that the driver is only
considered whole when the values refer to all the values corresponding
to the parent tuple.

This fixes the case where the compiler improperly tries to do a bulk
connection.

The desired behavior is to check:
is the value connected to the current tuple "whole", which means
that a tuple of the same type is connected to the current tuple,
in this case we can  connect the two tuples together, rather than
their components.

However, this check was improperly indicating a bulk connection in the
case when the driving value satisfied all the properties for a whole
tuple, except that it doesn't contain all the keys of the parent tuple.

This change strengthens the check to ensure that the driver is only
considered whole when the values refer to all the values corresponding
to the parent tuple.
@coveralls
Copy link

coveralls commented Nov 8, 2019

Pull Request Test Coverage Report for Build 2306

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 74.624%

Totals Coverage Status
Change from base Build 2286: 0.04%
Covered Lines: 8828
Relevant Lines: 11830

💛 - Coveralls

@@ -131,6 +131,10 @@ def iswhole(self, ts):
if ts[i].name.index != self.Ks[i]:
return False

if len(ts) != len(ts[0].name.tuple):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this "exclusion" method is not robust (e.g. we found another case that indicated non-whole-ness)...probably would be better to write down the exact condition we want and check for it.

But if this fixes the immediate issue, we can fix ^ separately.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

@leonardt leonardt merged commit e059d4c into master Nov 8, 2019
@leonardt leonardt deleted the hotfix-tuple branch November 8, 2019 18:31
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.

None yet

3 participants