go-mysql-server icon indicating copy to clipboard operation
go-mysql-server copied to clipboard

resolver should expand *expression.Star

Open max-hoffman opened this issue 3 years ago • 0 comments

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.

max-hoffman avatar Jan 21 '22 16:01 max-hoffman