Skip to content

Execute plans during plan tests to make sure plans are valid and executable. #8230

@mustafasrepo

Description

@mustafasrepo

Is your feature request related to a problem or challenge?

In the link, @alamb suggested that adding a run pass to the plans would be better to make sure that plan is indeed runnable. I think this feature is really nice. We can add this support to the tests under following files:

  • replace_with_order_preserving_variants.rs
  • enforce_distirbution.rs
  • enforce_sorting.rs

Describe the solution you'd like

I think, we can execute optimized ExecutionPlans, inside assert_optimized! macro after checking that plan is as expected. After collecting all the result (preferably with single row) with collect(plan, task_ctx).await? we would expect success at the output. If there is any inconsistency in the schema, execution will show errors.

I think for this task we can use EmptyExec with single row at the source.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions