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

SQL: Extend the optimisations for equalities #50792

Merged
merged 5 commits into from
Jan 14, 2020

Commits on Jan 9, 2020

  1. Extend the optimizations for equalities

    This commit supplements the optimisations of equalities in conjunctions
    and disjunctions:
    * for conjunctions, the existing optimizations with ranges are extended
    with not-equalities and inequalities; these lead to a fast resolution,
    the conjunction either being evaluate to a FALSE, or the non-equality
    conditions being dropped as superfluous;
    * optimisations for disjunctions are added to be applied against ranges,
    inequalities and not-equalities; these lead to disjunction either
    becoming TRUE or the equality being dropped, either as superfluous or
    merged into a range/inequality.
    bpintea committed Jan 9, 2020
    Configuration menu
    Copy the full SHA
    59bb258 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2020

  1. Adress review notes

    * Fix the bug around wrongly optimizing 'a=2 OR a!=?', which only yields
    TRUE for same values in equality and inequality.
    * Var renamings, code style adjustments, comments corrections.
    bpintea committed Jan 10, 2020
    Configuration menu
    Copy the full SHA
    3eee6ca View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2020

  1. Address further review comments. Extend optim.

    - fix a few code comments;
    - extend the Equals OR NotEquals optimitsation (a=2 OR a!=5 -> a!=5);
    - extend the Equals OR Range optimisation on limits equality (a=2 OR
      2<=a<5 -> 2<=a<5);
    - in case an equality is being removed in a conjunction, the rest of
      possible optimisations to test is now skipped.
    bpintea committed Jan 13, 2020
    Configuration menu
    Copy the full SHA
    55da035 View commit details
    Browse the repository at this point in the history
  2. rename one var for better legiblity

    - s/rmEqual/removeEquals
    bpintea committed Jan 13, 2020
    Configuration menu
    Copy the full SHA
    cab0248 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7755d1d View commit details
    Browse the repository at this point in the history