public static Map<String, Integer> buidColumnIndexMap(final List<ColumnMetaData> columns, final Parser p) {
        Map<String, Integer> map = null;
        if (columns != null && !columns.isEmpty()) {
            map = new HashMap<String, Integer>();
            int idx = 0;
            for (final ColumnMetaData meta : columns) {
                String colName = meta.getColName();
                if (p != null && !p.isColumnNamesCaseSensitive()) {
                    // user has selected to make column names case sensitive
                    // on lookups
                    colName = colName.toLowerCase(Locale.getDefault());
                }
                map.put(colName, idx++);
            }
        }
        return map;
    }