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: Check HashJoin exists on keys and CNF and DNF inference #149

Merged
merged 6 commits into from
Mar 2, 2024

Conversation

KKould
Copy link
Member

@KKould KKould commented Mar 2, 2024

What problem does this PR solve?

  • invalid:
    • NestLoopJoin is currently not supported, so when Join exists Or, the corresponding exception is thrown.
    • when there is no equivalent condition in HashJoin, an exception is thrown
    • when the index is PrimaryKey, the cost will not multiply by 2.
  • fix:
    • the problem of missing on conditions when multi-layer Join
    • being classified as an And condition when And and Or exist
    • When the range in Or is Unbound, Dummy is returned (wrong)
    • the problem of incorrect ConstantBinary::and_scope_aggregation when And exists in Or
    • Ignore ConstantBinary::Scope whose lower bound is larger than the upper bound
    • When the same NotEq and Eq exist in or, convert to Unbound
  • perf:
    • when And has multiple Eq, the effect of Dummy is returned, and the cases of Dummy and Unbound are distinguished: EmptyVec that originally represented Unbound is replaced by ScopeUnbound, and EmptyVec represents, And Dummy won't do any iterations

Code changes

  • Has Rust code change
  • Has CI related scripts change

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Note for reviewer

KKould added 4 commits March 2, 2024 18:43
…ts Or, the corresponding exception is thrown.
…, and the cases of `Dummy` and `Unbound` are distinguished: `EmptyVec` that originally represented `Unbound` is replaced by `ScopeUnbound`, and `EmptyVec` represents `Dummy`

invalid: when the index is `PrimaryKey`, the cost will not multiply by 2.
… on conditions when multi-layer Join ...

- invalid: when there is no equivalent condition in HashJoin, an exception is thrown
- fix: the problem of missing on conditions when multi-layer Join
- fix: being classified as an `And` condition when `And` and `Or` exist
- perf: `And` when multiple `Eq` conditions exist at the same time, return `Dummy`
- fix: When the range in `Or` is `Unbound`, `Dummy` is returned.
@KKould KKould self-assigned this Mar 2, 2024
@KKould KKould added bug Something isn't working invalid This doesn't seem right labels Mar 2, 2024
KKould added 2 commits March 2, 2024 18:56
… when `And` exists in `Or` and Ignore `ConstantBinary::Scope` whose lower bound is larger than the upper bound and When the same NotEq and Eq exist in or, convert to Unbound
@KKould KKould merged commit c9b76f1 into KipData:main Mar 2, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant