dolt icon indicating copy to clipboard operation
dolt copied to clipboard

COUNT(*) select start impedance mismatch

Open max-hoffman opened this issue 3 years ago • 1 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

Rename is innaccurate imo, we want to avoid expanding * but it's two separate problems. One is that it's an unreasonable edge case that we manually handle an unresolved star as resolved in this one case. The other is that a different physical operator would be more efficient.

max-hoffman avatar Dec 01 '22 17:12 max-hoffman

I'm going to resolve with no customer really understands what this bug is. Add it as an item on the analyzer roadmap if necessary. We should reserve public issues for things that a reasonably informed customer would understand.

timsehn avatar Feb 10 '23 00:02 timsehn