private void createBins(String tab, String col) {
        BufferedReader br = null;
        int key;
        int lines = 0;
        String s;
        StringBuilder sb_array[] = initTmap();
        int cnt = getColNumber(col, tab);

        ArrayList<Metadata>[] mlist = null;
        String expression = null;
        String[] colNames = null;
        int[] cntList = null;
        boolean isConditionPresent = false;
        String[] datatype = null;
        BooleanEvaluator be = null;
        if (tabinfo.containsKey(tab)) {
            colNames = new String[tabinfo.get(tab).getCol().size()];
            datatype = new String[tabinfo.get(tab).getCol().size()];
            tabinfo.get(tab).setCntList();
            tabinfo.get(tab).setDatatype();
            expression = tabinfo.get(tab).getExp();
            int count = 0;
            for (String temp : tabinfo.get(tab).getCol()) {
                colNames[count++] = temp;
            }
            cntList = tabinfo.get(tab).getCntList();
            datatype = tabinfo.get(tab).getDatatype();

            mlist = tabinfo.get(tab).getAndOrList();
            be = new BooleanEvaluator();
            isConditionPresent = true;
        }
        File f = new File(Main.data_dir + "/" + tab + ".dat");
        if (!f.exists()) {
            f = new File(Main.swap_dir + "/" + tab + ".dat");
        }

        try {
            br = new BufferedReader(new FileReader(f));

            while ((s = br.readLine()) != null) {
                if (isConditionPresent) {
                    // if (calculateCondition(s, tab, expression, colNames,
                    // cntList, datatype)) {
                    if (be.calculateBoolean(mlist, s)) {
                        lines++;
                        key = Integer.parseInt(s.split("\\|")[cnt]) % BINS;
                        sb_array[key].append(s + "\n");
                        if (lines > limit) {
                            flushToDisk(sb_array, tab);
                            sb_array = initTmap();
                            // System.gc();
                            lines = 0;
                        }
                    }
                } else {
                    lines++;
                    key = Integer.parseInt(s.split("\\|")[cnt]) % BINS;
                    sb_array[key].append(s + "\n");
                    if (lines > limit) {
                        flushToDisk(sb_array, tab);
                        sb_array = initTmap();
                        // System.gc();
                        lines = 0;
                    }
                }
            }
            br.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
        flushToDisk(sb_array, tab);
        sb_array = initTmap();
        // System.gc();
    }