Example #1
0
func findColumnIndexByGroup(groups []LogicalPlan, col *expression.Column) int {
	for i, plan := range groups {
		idx := plan.GetSchema().GetIndex(col)
		if idx != -1 {
			return i
		}
	}
	log.Errorf("Unknown columns %s, from id %s, position %d", col.ToString(), col.FromID, col.Position)
	return -1
}