go-mysql-server
go-mysql-server copied to clipboard
resolver should expand *expression.Star
The old count aggregate logic uses *expression.Star
during evaluation, and explicitly ignores the expression for resolving:
func (a *unaryAggBase) Resolved() bool {
if _, ok := a.Child.(*expression.Star); ok {
return true
}
When this logic is deleted, the aggregation node fails to resolve and the analyzer errors.
TODO: make a new expression (like AggregationStar?) that is a resolved version of expression star, and use that expression in evaluation logic.