Package com.foundationdb.sql.optimizer.rule.join_enum.DPhyp

Examples of com.foundationdb.sql.optimizer.rule.join_enum.DPhyp.ExpressionTables


            }
            if (joins.getRight() instanceof TableGroupJoinTree) {
                rightTable = processor.getTableBit(joins.getRight());
            }
           
            ExpressionTables visitor = new ExpressionTables(processor.getTableBitSets());

            //protected void addWhereConditions(ConditionList whereConditions, ExpressionTables visitor) {           
            Iterator<ConditionExpression> iter = queryGoal.getWhereConditions().iterator();
            while (iter.hasNext()) {
                ConditionExpression condition = iter.next();
                if (condition instanceof ComparisonCondition) {
                    ComparisonCondition comp = (ComparisonCondition)condition;
                    long columnTables = columnReferenceTable(comp.getLeft(), processor.getTableBitSets());
                    if (!JoinableBitSet.isEmpty(columnTables)) {
                        long rhs = visitor.getTables(comp.getRight());
                        if (visitor.wasNullTolerant()) continue;
                        if (!JoinableBitSet.isEmpty(rhs) &&
                                !JoinableBitSet.overlaps(columnTables, rhs) &&
                                joins.getFKJoin().getConditions().contains(comp)) {
                            operators.add(new JoinOperator(comp, columnTables, rhs));
                            iter.remove();
                            continue;
                        }
                    }
                    columnTables = columnReferenceTable(comp.getRight(), processor.getTableBitSets());
                    if (!JoinableBitSet.isEmpty(columnTables)) {
                        long lhs = visitor.getTables(comp.getLeft());
                        if (visitor.wasNullTolerant()) continue;
                        if (!JoinableBitSet.isEmpty(lhs) &&
                                !JoinableBitSet.overlaps(columnTables, lhs) &&
                                joins.getFKJoin().getConditions().contains(comp)) {
                            operators.add(new JoinOperator(comp, columnTables, lhs));
                            iter.remove();
View Full Code Here

TOP

Related Classes of com.foundationdb.sql.optimizer.rule.join_enum.DPhyp.ExpressionTables

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.