class TableUtil {

    public static int findColIndexWithAssertAndHint(String[] tableCols, String targetCol) {
        int index = findColIndex(tableCols, targetCol);
        if(index < 0){
            double maxSimilarity = 0.0;
            String similarCol = null;
            for(String s : tableCols){
                double similarity = levenshteinSimilarity.similarity(s, targetCol);
                if(similarity > maxSimilarity){
                    maxSimilarity = similarity;
                    similarCol = s;
                }
            }
            if(maxSimilarity > 0.7) {
                throw new IllegalArgumentException(
                    "Can not find column: " + targetCol + ", do you mean: " + similarCol + " ?");
            }else{
                throw new IllegalArgumentException("Can not find column: " + targetCol);
            }
        }
        return index;
    }

}