-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
remove duplicate the logic b/w DataFrame API and SQL planning #5686
remove duplicate the logic b/w DataFrame API and SQL planning #5686
Conversation
8c7d06a
to
2318a80
Compare
09c0ae4
to
c9e610d
Compare
88db38a
to
e917a33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sorry for the delay in review. I will try and find more time to review this carefully tomorrow but initially I am surprised that says it removes duplicated logic adds more code than it removes 🤔
datafusion/common/src/dfschema.rs
Outdated
@@ -630,9 +630,9 @@ impl ExprSchema for DFSchema { | |||
#[derive(Debug, Clone, PartialEq, Eq, Hash)] | |||
pub struct DFField { | |||
/// Optional qualifier (usually a table or relation name) | |||
qualifier: Option<OwnedTableReference>, | |||
pub qualifier: Option<OwnedTableReference>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please explain the rationale for this change?
@@ -1161,15 +1161,6 @@ async fn try_execute_to_batches( | |||
/// Execute query and return results as a Vec of RecordBatches | |||
async fn execute_to_batches(ctx: &SessionContext, sql: &str) -> Vec<RecordBatch> { | |||
let df = ctx.sql(sql).await.unwrap(); | |||
|
|||
// We are not really interested in the direct output of optimized_logical_plan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed?
Because when I started to remove the duplicate logic between the DataFrame API and SQL planning, I found that count_wildcard_rule did not cover all scenarios, such as union, window, etc. for example, before this pr.
|
This makes sense -- thank you for the explanation @jiangzhx Can you please add DataFrame tests the relevant behavior (mostly so that we don't break it in the future by accident) |
Marking as draft to signify this PR has feedback and is not waiting for another review at the moment. |
e917a33
to
423e604
Compare
11c2ff8
to
3f22001
Compare
i added some testcase in tests/dataframe.rs
|
3f22001
to
9c845de
Compare
4d94f9c
to
dc5e1c0
Compare
fb3d0ec
to
692bfac
Compare
split this pr in two part.
|
7f2a745
to
f308261
Compare
f308261
to
623c634
Compare
Since this has been open for more than a year, closing it down. Feel free to reopen if/when you keep working on it. |
Which issue does this PR close?
now the count wildcard rules already move to Analyzer #5671
so remove duplicate the logic in SQL planning.
Closes #.
Rationale for this change
related issues: #5473 (comment)
related PR: #5671
What changes are included in this PR?
Are there any user-facing changes?