Examples of BinaryExpression


Examples of org.apache.pig.Expression.BinaryExpression

          opStr = " = ";
          break;
        default:
          opStr = expr.getOpType().toString();
      }
      BinaryExpression be = (BinaryExpression)expr;
      return "(" + getHowlComparisonString(be.getLhs()) +
                  opStr +
                  getHowlComparisonString(be.getRhs()) + ")";
    } else {
      // should be a constant or column
      return expr.toString();
    }
  }
View Full Code Here

Examples of org.apache.pig.Expression.BinaryExpression

        opStr = " = ";
        break;
      default:
        opStr = expr.getOpType().toString();
      }
      BinaryExpression be = (BinaryExpression) expr;
      return "(" + getHCatComparisonString(be.getLhs()) +
        opStr +
        getHCatComparisonString(be.getRhs()) + ")";
    } else {
      // should be a constant or column
      return expr.toString();
    }
  }
View Full Code Here

Examples of org.apache.pig.Expression.BinaryExpression

        opStr = " = ";
        break;
      default:
        opStr = expr.getOpType().toString();
      }
      BinaryExpression be = (BinaryExpression) expr;
      return "(" + getHCatComparisonString(be.getLhs()) +
        opStr +
        getHCatComparisonString(be.getRhs()) + ")";
    } else {
      // should be a constant or column
      return expr.toString();
    }
  }
View Full Code Here

Examples of org.apache.pig.Expression.BinaryExpression

          opStr = " = ";
          break;
        default:
          opStr = expr.getOpType().toString();
      }
      BinaryExpression be = (BinaryExpression)expr;
      return "(" + getHCatComparisonString(be.getLhs()) +
                  opStr +
                  getHCatComparisonString(be.getRhs()) + ")";
    } else {
      // should be a constant or column
      return expr.toString();
    }
  }
View Full Code Here

Examples of org.apache.pig.newplan.logical.expression.BinaryExpression

    // we will visit the leaf and it will recursively walk the plan
    LogicalExpression leaf = (LogicalExpression)plan.getSources().get( 0 );
    // if the leaf is a unary operator it should be a FilterFunc in
    // which case we don't try to extract partition filter conditions
    if(leaf instanceof BinaryExpression) {
      BinaryExpression binExpr = (BinaryExpression)leaf;
      visit( binExpr );
      replaceChild( binExpr );
      // if the entire expression is to be removed, then the above
      // replaceChild will not set sawKey to false (sawKey is set to
      // false only in replaceChild()
View Full Code Here

Examples of org.apache.pig.newplan.logical.expression.BinaryExpression

            return new Expression.Column(fieldName);
        } else {
      if( !( op instanceof BinaryExpression ) ) {
        throwException();
      }
      BinaryExpression binOp = (BinaryExpression)op;
      if(binOp instanceof AddExpression) {
        return getExpression( binOp, OpType.OP_PLUS );
      } else if(binOp instanceof SubtractExpression) {
        return getExpression(binOp, OpType.OP_MINUS);
      } else if(binOp instanceof MultiplyExpression) {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.BinaryExpression

}
public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) {

  // optimizing assignment like: i = i + 1 or i = 1 + i
  if (assignment.expression.isCompactableOperation()) {
    BinaryExpression operation = (BinaryExpression) assignment.expression;
    int operator = (operation.bits & OperatorMASK) >> OperatorSHIFT;
    SingleNameReference variableReference;
    if ((operation.left instanceof SingleNameReference) && ((variableReference = (SingleNameReference) operation.left).binding == this.binding)) {
      // i = i + value, then use the variable on the right hand side, since it has the correct implicit conversion
      variableReference.generateCompoundAssignment(currentScope, codeStream, this.syntheticAccessors == null ? null : this.syntheticAccessors[WRITE], operation.right, operator, operation.implicitConversion, valueRequired);
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.BinaryExpression

      } else if (e instanceof BinaryExpression) {
        if (expressionLevel != 0) {
          output.append('(');
        }
        expressionLevel++;
        BinaryExpression be = (BinaryExpression) e;
        printExpression(be.left).append(' ').append(be.operatorToString()).append(' ');
        printExpression(be.right);
        expressionLevel--;
        if (expressionLevel != 0) {
          output.append(')');
        }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.BinaryExpression

      this.addRealFragment(combinedBinaryExpression.left);
      this.operatorsList.add(new Integer(TerminalTokens.TokenNamePLUS));
      this.addRealFragment(combinedBinaryExpression.right);
      return false;
    }
    BinaryExpression cursor = combinedBinaryExpression.referencesTable[0];
    if (cursor.left instanceof CombinedBinaryExpression) {
      this.visit((CombinedBinaryExpression) cursor.left, scope);
    } else {
      this.addRealFragment(cursor.left);
    }
View Full Code Here

Examples of org.codehaus.groovy.ast.expr.BinaryExpression

    public void and(T other) {
        Validate.notNull(other);

        BooleanExpression newBooleanExpression =
                new BooleanExpression(
                        new BinaryExpression(
                                booleanExpression(),
                                Token.newSymbol(Types.LOGICAL_AND, -1, -1),
                                other.booleanExpression()
                        )
                );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.