code: func (cf *countFunction) CalculateDefaultValue(schema Schema, ctx context.Context) (d types.Datum, valid bool) {
  	for _, arg := range cf.Args {
  		result, err := EvaluateExprWithNull(ctx, schema, arg)
  		if err != nil {
  			log.Printf("Evaluate expr with null failed in function %s, err msg is %s", cf, err.Error())
  			return d, false
  		}
  		if con, ok := result.(*Constant); ok {
  			if con.Value.IsNull() {
  				return types.NewDatum(0), true
  			}
  		} else {
  			return d, false
  		}
  	}
  	return types.NewDatum(1), true
  }
docs: // CalculateDefaultValue implements AggregationFunction interface.