public LinkedHashMap<Integer, List<Tuple>> caculateMultipleFrom() {
        List<Expression> where_exp = new ArrayList<Expression>();
        ExpressionEvaluator e = new ExpressionEvaluator();
        where = select.getWhere();
        Expression exp = where;
        exp.accept(e);
        where_exp = e.getExpList();

        ArrayList<HashSet<Tuple>> tablesInMemory = new ArrayList<HashSet<Tuple>>();
        ArrayList<String> table_names = new ArrayList<String>();
        for (Table t : tables) {

            table_names.add(t.getWholeTableName());
            String dat_file = Main.data_dir + "/" + t.getWholeTableName() + ".dat";
            tablesInMemory.add(readTable(dat_file, t));
        }

        // Weird logic to get all the expressions as a list
        List<Expression> new_where_exp = new ArrayList<Expression>();
        for (int i = 0; i < where_exp.size(); i++) {
            if (i < where_exp.size() - 2) {
                new_where_exp.add(where_exp.get(i + 1));
                i++;
            } else {
                new_where_exp.add(where_exp.get(i));
            }
        }

        for (Expression w : new_where_exp) {

            List<String> tab_list = new ArrayList<String>();
            ExpressionEvaluator e1 = new ExpressionEvaluator();
            w.accept(e1);
            colnames = e1.getColNames();
            for (String tab : colnames) {
                tab_list.add(tab.split("\\.")[0]);
            }

            ArrayList<Integer> index = new ArrayList<Integer>();
            for (String t : tab_list) {

                if (table_names.indexOf(t) != -1)
                    index.add(table_names.indexOf(t));
            }

            ArrayList<HashSet<Tuple>> wc = new ArrayList<HashSet<Tuple>>();
            for (int i : index) {
                wc.add(tablesInMemory.get(i));
            }

            wh = new OperatorWhere(colnames, w);

            eleminateTuples(wc);
            // System.out.println(h1.size() +" -- "+h2.size());
            tablesInMemory.set(index.get(0), h1);
            h1 = new HashSet<Tuple>();

            if (index.size() > 1) {
                tablesInMemory.set(index.get(1), h2);
                h2 = new HashSet<Tuple>();
            }
        }

        where.accept(e);
        colnames = e.getColNames();
        wh = new OperatorWhere(colnames, where);

        generateCartesianProduct(tablesInMemory, new ArrayList<Tuple>());
        // System.out.println(outstream.size());
        // System.out.println(outstream);
        // System.err.println("1- "+outstream.size());
        return outstream;

    }