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

Don't shard binary ops of only constants #2558

Merged
merged 4 commits into from
Jul 27, 2022

Conversation

colega
Copy link
Contributor

@colega colega commented Jul 27, 2022

What this PR does

When both sides are constant scalar values, it doesn't make sense to shard them (plus it provides duplicate series).

Which issue(s) this PR fixes or relates to

No issue was created.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

When both sides are constant scalar values, it doesn't make sense to
shard them.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
@colega colega marked this pull request as draft July 27, 2022 11:20
Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Makes sense to me.

@colega
Copy link
Contributor Author

colega commented Jul 27, 2022

I still need to work on this, it doesn't cover all cases, like where one side is scalar but not constant.

We expect exactly one result, and parallelising will return many.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
@colega colega requested a review from pracucci July 27, 2022 13:46
@colega colega marked this pull request as ready for review July 27, 2022 13:46
@colega
Copy link
Contributor Author

colega commented Jul 27, 2022

Updated, now we reject all the bool operations, since bools should yield just one result, and sharding will provide many (one per shard).

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
@colega colega enabled auto-merge (squash) July 27, 2022 14:24
@colega colega merged commit 3966d4d into main Jul 27, 2022
@colega colega deleted the dont-shard-binary-ops-of-only-constants branch July 27, 2022 14:37
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.

2 participants