Skip to content
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

revert #6595 #6820 #6827

Merged
merged 4 commits into from
Jul 4, 2023
Merged

revert #6595 #6820 #6827

merged 4 commits into from
Jul 4, 2023

Conversation

jackwener
Copy link
Member

@jackwener jackwener commented Jul 3, 2023

Which issue does this PR close?

Closes #6819 #6790 .

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the logical-expr Logical plan and expressions label Jul 3, 2023
@github-actions github-actions bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Jul 3, 2023
@jackwener
Copy link
Member Author

jackwener commented Jul 3, 2023

❯ create table "MyTable" (
"A"    VARCHAR,
"B"    VARCHAR,
"time" timestamp

);

0 rows in set. Query took 0.001 seconds.

❯ SELECT "A", COUNT(DISTINCT("B"))
FROM "MyTable"
WHERE time >= now() - interval '1 month'
GROUP BY "A"
LIMIT 10;

+-----------+---------------------------+
| MyTable.A | COUNT(DISTINCT MyTable.B) |
+-----------+---------------------------+
+-----------+---------------------------+
0 rows in set. Query took 0.020 seconds.

@jackwener jackwener requested a review from alamb July 3, 2023 13:40
@jackwener jackwener force-pushed the revert branch 2 times, most recently from 14d75b7 to 3224f44 Compare July 3, 2023 14:22
@github-actions github-actions bot added optimizer Optimizer rules and removed core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Jul 3, 2023
@jackwener jackwener changed the title revert #6595 revert #6595 #6820 Jul 3, 2023
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.

I think this needs some tests given that we didn't catch it initially, so we don't know if this code is covered or not.

I will contribute some shortly

@alamb
Copy link
Contributor

alamb commented Jul 3, 2023

BTW here are some tests (that I verified that this PR fixes the errors): #6836

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.

Thanks @jackwener

@jackwener
Copy link
Member Author

Thanks @alamb

@jackwener jackwener merged commit 137bf81 into apache:main Jul 4, 2023
@jackwener jackwener deleted the revert branch July 4, 2023 06:59
2010YOUY01 pushed a commit to 2010YOUY01/arrow-datafusion that referenced this pull request Jul 5, 2023
* revert: from_plan keep same schema Project in apache#6595

* revert: from_plan keep same schema Agg/Window in apache#6820

* revert type coercion

* add comment
yukkit pushed a commit to cnosdb/arrow-datafusion that referenced this pull request Jul 10, 2023
* revert: from_plan keep same schema Project in apache#6595

* revert: from_plan keep same schema Agg/Window in apache#6820

* revert type coercion

* add comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logical-expr Logical plan and expressions optimizer Optimizer rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimizer rule 'push_down_projection' failed
2 participants