Skip to content

Conversation

@jackwener
Copy link
Member

@jackwener jackwener commented Jun 13, 2023

Which issue does this PR close?

Closes #.

Rationale for this change

What changes are included in this PR?

  • replace count() analyzer by removing it in sql crate, sql/dataframe all use rule to replace count()
  • fix: CountWildcardRule ignore Expr::Alias

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added core Core DataFusion crate optimizer Optimizer rules sql SQL Planner sqllogictest SQL Logic Tests (.slt) labels Jun 13, 2023
"Plan(\"HAVING clause references non-aggregate values: \
Expression person.first_name could not be resolved from available columns: \
COUNT(UInt8(1))\")",
COUNT(*)\")",
Copy link
Member Author

Choose a reason for hiding this comment

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

sql-crate don't replace count(*).
we use rule to replace unified count(*).

@jackwener jackwener requested a review from alamb June 13, 2023 15:27
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.

It makes a lot of sense to me to use a rewrite that is in the optimizer (so it happens as part of any plan, not just SQL plans). Thanks @jackwener

@alamb
Copy link
Contributor

alamb commented Jun 13, 2023

cc @jiangzhx who did some related work on #5518 I think

@jackwener jackwener merged commit 6194d58 into apache:main Jun 14, 2023
@jackwener jackwener deleted the remove_repl branch June 14, 2023 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate optimizer Optimizer rules sql SQL Planner sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants