com.lucidera.farrago
Class LucidDbSqlValidator.EquiJoinFinder
java.lang.Object
org.eigenbase.sql.util.SqlBasicVisitor<Void>
com.lucidera.farrago.LucidDbSqlValidator.EquiJoinFinder
- All Implemented Interfaces:
- SqlVisitor<Void>
- Enclosing class:
- LucidDbSqlValidator
private class LucidDbSqlValidator.EquiJoinFinder
- extends SqlBasicVisitor<Void>
Visitor that walks a SqlNode expression tree looking for an equijoin
between a source and target column.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
targetCol
private SqlIdentifier targetCol
sourceCol
private SqlIdentifier sourceCol
scope
private SqlValidatorScope scope
found
private boolean found
LucidDbSqlValidator.EquiJoinFinder
LucidDbSqlValidator.EquiJoinFinder(SqlIdentifier targetCol,
SqlIdentifier sourceCol,
SqlValidatorScope scope)
visit
public Void visit(SqlCall call)
- Description copied from interface:
SqlVisitor
- Visits a call to a
SqlOperator
.
- Specified by:
visit
in interface SqlVisitor<Void>
- Overrides:
visit
in class SqlBasicVisitor<Void>
- Parameters:
call
- Call- See Also:
SqlCall.accept(SqlVisitor)
checkOperands
private boolean checkOperands(SqlNode op1,
SqlNode op2)
- Determines if the first operand matches the target column and the
second matches the source column
- Parameters:
op1
- first operandop2
- second operand
- Returns:
- true if a match has been found
foundMatch
public boolean foundMatch()