private AbstractExpression parseTableCondition ( VoltXMLElement tableScan , String joinOrWhere ) { AbstractExpression condExpr = null ; for ( VoltXMLElement childNode : tableScan . children ) { if ( ! childNode . name . equalsIgnoreCase ( joinOrWhere ) ) { continue ; } assert ( childNode . children . size ( ) == 1 ) ; assert ( condExpr == null ) ; condExpr = parseConditionTree ( childNode . children . get ( 0 ) ) ; assert ( condExpr != null ) ; ExpressionUtil . finalizeValueTypes ( condExpr ) ; condExpr = ExpressionUtil . evaluateExpression ( condExpr ) ; // If the condition is a trivial CVE(TRUE) (after the evaluation) simply drop it if ( ConstantValueExpression . isBooleanTrue ( condExpr ) ) { condExpr = null ; } } return condExpr ; }
Parse a where or join clause . This behavior is common to all kinds of statements .