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: add support for aggregations and values in the new factory #50560

Merged
merged 8 commits into from
Jul 1, 2020

Commits on Jun 30, 2020

  1. sql: remove some unnecessary things around aggregations

    Release note: None
    yuzefovich committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    f338785 View commit details
    Browse the repository at this point in the history
  2. sql: add support for aggregations in the new factory

    This commit implements `ConstructGroupBy` and `ConstructScalarGroupBy`
    methods in the new factory by populating the specs upfront and reusing
    DistSQLPlanner to do the actual planning.
    
    Release note: None
    yuzefovich committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    54ad307 View commit details
    Browse the repository at this point in the history
  3. sql: minor cleanup of planNodeToRowSource

    This commit cleans up `planNodeToRowSource` to be properly closed
    (similar to other processors).
    
    Release note: None
    yuzefovich committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    b042167 View commit details
    Browse the repository at this point in the history
  4. sql: implement ConstructValues in the new factory

    This commit adds implementation of `ConstructValues` in the new factory.
    In some cases, a valuesNode is the only way to "construct values" - when
    the node must be wrapped (see createPhysPlanForValuesNode for more
    details). In other cases, a valuesNode is used to construct the values
    processor spec. The latter usage is refactored to avoid valuesNode
    creation.
    
    This decision also prompts us to add a separate "side" list of
    `planNode`s that are part of the physical plan and need to be closed
    when the whole plan is closed. This is done by introducing a utility
    wrapper around `PhysicalPlan`. This approach was chosen after
    considering an alternative in which `planNodeToRowSource` adapter would
    be the one closing the `planNode` it is wrapping because
    `planNode.Close` contract currently prohibits the execution from closing
    any of the `planNode`s, and changined that would be quite invasive at
    this point. We might reevaluate this decision later, once we've made
    more progress on the distsql spec work.
    
    Release note: None
    yuzefovich committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    f93724f View commit details
    Browse the repository at this point in the history
  5. logictest: add spec-planning configs to the default ones

    We have now implemented noticeable chunk of methods in the new factory,
    so I think it makes to run all logic tests with the spec-planning
    configs by default.
    
    The only logic test that is currently skipped is interleaved_join
    because the new factory doesn't plan interleaved joins yet.
    
    Release note: None
    yuzefovich committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    74e3a97 View commit details
    Browse the repository at this point in the history
  6. sql: enhance unsupported error message in the new factory

    Release note: None
    yuzefovich committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    b413445 View commit details
    Browse the repository at this point in the history
  7. sql: support simple projection on top of planNode in the new factory

    The new factory still constructs some of the `planNode`s (for example,
    explain variants), and we should be able to handle simple projections on
    top of those. This is handled by reusing the logic from the old factory.
    The issue was hidden by the fallback to the old factory since EXPLAIN
    statements don't have "SELECT" statement tag.
    
    Release note: None
    yuzefovich committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    c6138fe View commit details
    Browse the repository at this point in the history
  8. sql: implement ConstructLimit in the new factory

    This commit additionally removes the requirement that `limitExpr` and
    `offsetExpr` must be distributable in order for the whole plan to be
    distributable in the old path because those expressions are evaluated
    during the physical planning, locally.
    
    Release note: None
    yuzefovich committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    59b0a87 View commit details
    Browse the repository at this point in the history