private static int find(List<ColumnSchema> schemas, String colName, SQLType type) {
        int colId = -1;
        SQLType colType = null;
        int ordinal = 0;
        for (ColumnSchema cs : schemas) {
            if (cs.name.equalsIgnoreCase(colName)) {
                colId = ordinal;
                colType = cs.getSqlType();
                break;
            }
            ordinal++;
        }
        if (colId == -1) {
            throw new RuntimeException(String.format("column [name: %s, type: %s] not found in columns [%s]", colName, type, schemas));
        }
        Preconditions.checkState(colType == type, "Column type not match");
        return colId;
    }
Attr is a pointer to a column in a table. It could point to different columnIds in different segments.
indexr-segment/src/main/java/io/indexr/segment/rc/Attr.java