code: func (la *LogicalAggregation) DeriveStats(childStats []*property.StatsInfo) (*property.StatsInfo, error) {
  	childProfile := childStats[0]
  	gbyCols := make([]*expression.Column, 0, len(la.GroupByItems))
  	for _, gbyExpr := range la.GroupByItems {
  		cols := expression.ExtractColumns(gbyExpr)
  		gbyCols = append(gbyCols, cols...)
  	}
  	cardinality := getCardinality(gbyCols, la.children[0].Schema(), childProfile)
  	la.stats = &property.StatsInfo{
  		RowCount:    cardinality,
  		Cardinality: make([]float64, la.schema.Len()),
  	}
  	// We cannot estimate the Cardinality for every output, so we use a conservative strategy.
  	for i := range la.stats.Cardinality {
  		la.stats.Cardinality[i] = cardinality
  	}
  	la.inputCount = childProfile.RowCount
  	return la.stats, nil
  }
docs: // DeriveStats implement LogicalPlan DeriveStats interface.