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

Migrate AddExchanges to iterative optimizer #7169

Closed
kokosing opened this issue Jan 20, 2017 · 2 comments
Closed

Migrate AddExchanges to iterative optimizer #7169

kokosing opened this issue Jan 20, 2017 · 2 comments
Assignees

Comments

@kokosing
Copy link
Contributor

No description provided.

@kokosing kokosing self-assigned this May 31, 2017
@kokosing
Copy link
Contributor Author

kokosing commented Jul 11, 2017

Design is mostly based on:

We are going to add a new kind of optimizer which will have two phases:

  • exhaustive - where search space (memo) is populated
  • optimize - where the best plan is found from the search space
    This will be wrapped as ExhaustiveOptimizer, it will we be using the same Rule interface as IterativeOptimizer.

Below is the minimal list what have to be done to migrate AddExchanges.

Plan of attack (list of features that ExhaustiveOptimizer will support):

  1. Support simple pattern matching with captures, so rule can say I need a filter on top of project and these nodes will be captured and provided to rule via Lookup
  2. Make possible that Rule application can return several alternative plan nodes. For example when partitioning is considered a rule may return several different plan nodes one per each instance of partitioning (partitioned by a or a,b or a,b,c or a,c). It can be either satisfied by a returning a list or by injecting consumer.
  3. Introduce traits (physical properties) and trait sets.
  • simple traits algebra (ability that this trait instance is satisfied by this trait instance)
  • (optional) trait enforcers
  • (optional) negation traits (for example information that plan node is not yet partitioned)
  1. Rule will be able to return plans with specified trait sets.
  2. Introduce memo that will store several plan nodes per group (equivalence based)
  3. Introduce ExhaustiveOptimizer
  • Do not run rule which was run with the same captures twice (as rules are deterministic)
  1. Finding the best plan algorithm within the memo with the usage of some sort of cost calculator (heuristic).
  2. Migrate AddExchanges as set of Rules

The above order is just a suggestion, actual order of how things will be implemented may differ.
Optional points are not yet decided if they will be needed.
This plan is just an initial idea, it may change as we go.

CC: @martint @ilfrin @sopel39

@stale
Copy link

stale bot commented Jul 13, 2019

This issue has been automatically marked as stale because it has not had any activity in the last 2 years. If you feel that this issue is important, just comment and the stale tag will be removed; otherwise it will be closed in 7 days. This is an attempt to ensure that our open issues remain valuable and relevant so that we can keep track of what needs to be done and prioritize the right things.

@stale stale bot added the stale label Jul 13, 2019
@stale stale bot closed this as completed Jul 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant