Skip to content

Bugfix: Add functional dependency check and aggregate try_new schema#8584

Merged
mustafasrepo merged 3 commits intoapache:mainfrom
synnada-ai:minor/func_deps_schema
Dec 20, 2023
Merged

Bugfix: Add functional dependency check and aggregate try_new schema#8584
mustafasrepo merged 3 commits intoapache:mainfrom
synnada-ai:minor/func_deps_schema

Conversation

@mustafasrepo
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #.

Rationale for this change

Make sure schema doesn't change for Aggregate during recreation. Fix functional dependency for wildcard expressions

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions Bot added logical-expr Logical plan and expressions core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Dec 19, 2023
@ozankabak ozankabak changed the title Add functional dependency check and aggregate try_new schema Bugfix: Add functional dependency check and aggregate try_new schema Dec 19, 2023
Copy link
Copy Markdown
Contributor

@ozankabak ozankabak left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @mustafasrepo. This is a small bugfix PR resolving issues around the functional dependency mechanism and modification of aggregate executors during planning, but let's keep it open for a day or two in case anyone wants to quickly check it out.

}

#[test]
fn test_agg_exec_same_schema() -> Result<()> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is there any way that this can be tested from SQL? Or does it require a programatic test?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Actually I tried to produce this error from a SQL test. However couldn't reproduce it. The reason may be related to the some rules in physical optimizer has schema_check flag false. But I am not sure, I couldn't come up with a reproducer from the SQL query.

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

Labels

core Core DataFusion crate logical-expr Logical plan and expressions sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants