Skip to content

Conversation

@backkem
Copy link
Contributor

@backkem backkem commented Mar 13, 2024

Relates to #8661

This is an initial attempt at porting over the LogicalPlan Unparser as described in the tracking ticket.

I took a similar approach to #9517 but moved the tests to sql::tests to make use of the MockContextProvider. I also took a stab at turning the tests into the roundtrip style (SQL -> Expr/Plan -> SQL) as discussed in the Expr PR.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @backkem -- this looks (really) nice to me. It is great to establish the pattern and then as people need more features they can contribute more to it.

Note I believe this will logically conflict somewhat with @devinjdangelo 's addition of a unparser feature flag in #9578


#[test]
fn roundtrip_expr() {
let tests: Vec<(TableReference, &str, &str)> = vec![
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI @devinjdangelo -- maybe we can consolidate the round trip expr tests from #9578 here too

@alamb alamb changed the title feat: support LogicalPlan to SQL String Initial support LogicalPlan to SQL String Mar 13, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Since #9578 is potentially conflicting and this one is larger, merging this PR in first

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

Labels

sql SQL Planner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants