code: func FromThriftToEntityDefinition(ed *dosarpc.EntityDefinition) *dosa.EntityDefinition {
  	fields := make([]*dosa.ColumnDefinition, len(ed.FieldDescs))
  	i := 0
  	for k, v := range ed.FieldDescs {
  		fields[i] = &dosa.ColumnDefinition{
  			Name: k,
  			Type: RPCTypeToClientType(*v.Type),
  			// TODO Tag
  		}
  		i++
  	}
  
  	indexes := make(map[string]*dosa.IndexDefinition)
  	for name, index := range ed.Indexes {
  		indexes[name] = &dosa.IndexDefinition{
  			Key: FromThriftToPrimaryKey(index.Key),
  		}
  	}
  
  	etlState := dosa.EtlOff
  	if ed.Etl != nil {
  		etlState = fromThriftToETLState(ed.Etl)
  	}
  
  	return &dosa.EntityDefinition{
  		Name:    *ed.Name,
  		Columns: fields,
  		Key:     FromThriftToPrimaryKey(ed.PrimaryKey),
  		Indexes: indexes,
  		ETL:     etlState,
  	}
  }
docs: // FromThriftToEntityDefinition converts the RPC EntityDefinition to client EntityDefinition