Skip to content

Conversation

@jiangyinzuo
Copy link
Contributor

@jiangyinzuo jiangyinzuo commented Mar 25, 2023

Which issue does this PR close?

Closes #1377.

Rationale for this change

I modify async fn expected_plan() to utilize EXPLAIN ... SQL statement to generate both logical and physical plans. There are only logical plans in benchmarks/expected-plans/*.txt before this commit.

What changes are included in this PR?

test output files in benchmarks/expected-plans/*.txt and async fn expected_plan() in tpch.rs

Are these changes tested?

yes

Are there any user-facing changes?

no

@alamb
Copy link
Contributor

alamb commented Mar 25, 2023

Thank you @jiangyinzuo

@andygrove can you give this a look?

let plan = df.into_optimized_plan()?;
if !actual.is_empty() {
actual += "\n";
if sql.starts_with("select") {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handle special query 15 which contains create view sql statement

@github-actions github-actions bot added the substrait Changes to the substrait crate label Mar 26, 2023
@github-actions github-actions bot removed the substrait Changes to the substrait crate label Mar 26, 2023
Ok(())
}

fn create_context() -> Result<SessionContext> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fix the parameter target_partitions so that the generated plans are the same in different machines.

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @jiangyinzuo

@Dandandan Dandandan merged commit 6309c76 into apache:main Mar 27, 2023
@Dandandan
Copy link
Contributor

Thank you @jiangyinzuo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests for TPCH explain plans to avoid regressions

4 participants