test_class.file: tajo-algebra/src/test/java/org/apache/tajo/algebra/TestExpr.java
test_class.identifier: TestExpr
test_case.body: @Test
    public void testEquals() throws Exception {
      Expr expr = new BinaryOperator(OpType.LessThan,
          new LiteralValue("1", LiteralType.Unsigned_Integer),
          new LiteralValue("2", LiteralType.Unsigned_Integer));
  
      Relation relation = new Relation("employee");
      Selection selection = new Selection(expr);
      selection.setChild(relation);
  
      Aggregation aggregation = new Aggregation();
      aggregation.setTargets(new NamedExpr[]{
            new NamedExpr(new ColumnReferenceExpr("col1"))
          }
      );
  
      aggregation.setChild(selection);
  
      Sort.SortSpec spec = new Sort.SortSpec(new ColumnReferenceExpr("col2"));
      Sort sort = new Sort(new Sort.SortSpec[]{spec});
      sort.setChild(aggregation);
  
      assertEquals(sort, sort);
  
      Expr different = generateOneExpr();
      assertFalse(sort.equals(different));
    }
test_case.class_method_signature: TestExpr.testEquals()
test_case.full_signature: @Test public void testEquals()
test_case.identifier: testEquals
test_case.invocations: setChild setTargets setChild setChild assertEquals generateOneExpr assertFalse equals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEquals()
focal_class.declarator: opType
focal_class.modifier: protected
focal_class.original_string: protected OpType opType;
focal_class.type: OpType
focal_class.var_name: opType
focal_class.file: tajo-algebra/src/main/java/org/apache/tajo/algebra/Expr.java
focal_class.identifier: Expr
focal_class.interfaces: implements JsonSerializable
focal_class.class_method_signature: Expr.Expr(OpType opType)
focal_class.full_signature: public  Expr(OpType opType)
focal_class.identifier: Expr
focal_class.modifiers: public
focal_class.parameters: (OpType opType)
focal_class.signature:  Expr(OpType opType)
focal_class.class_method_signature: Expr.getType()
focal_class.full_signature: public OpType getType()
focal_class.identifier: getType
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: OpType
focal_class.signature: OpType getType()
focal_class.class_method_signature: Expr.hashCode()
focal_class.full_signature: @Override public abstract int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public abstract
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: Expr.equalsTo(Expr expr)
focal_class.full_signature: abstract boolean equalsTo(Expr expr)
focal_class.identifier: equalsTo
focal_class.modifiers: abstract
focal_class.parameters: (Expr expr)
focal_class.return: boolean
focal_class.signature: boolean equalsTo(Expr expr)
focal_class.class_method_signature: Expr.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_class.class_method_signature: Expr.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: Expr.toJson()
focal_class.full_signature: public String toJson()
focal_class.identifier: toJson
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toJson()
focal_class.class_method_signature: Expr.accept(ExprVisitor visitor)
focal_class.full_signature: public void accept(ExprVisitor visitor)
focal_class.identifier: accept
focal_class.modifiers: public
focal_class.parameters: (ExprVisitor visitor)
focal_class.return: void
focal_class.signature: void accept(ExprVisitor visitor)
focal_method.body: @Override
  	public boolean equals(Object obj) {
  	  if (obj instanceof Expr) {
  	    Expr casted = (Expr) obj;
  
        if (this.opType == casted.opType && equalsTo(casted)) {
          if (this instanceof UnaryOperator) {
            UnaryOperator one = (UnaryOperator) this;
            UnaryOperator another = (UnaryOperator) casted;
            return one.getChild().equals(another.getChild());
          } else if (this instanceof BinaryOperator) {
  
            BinaryOperator bin = (BinaryOperator) this;
            BinaryOperator anotherBin = (BinaryOperator) casted;
  
            if (!bin.getLeft().equals(anotherBin.getLeft())) {
              return false;
            }
            if (!bin.getRight().equals(anotherBin.getRight())) {
              return false;
            }
  
            return true;
          } else {
            return this.equalsTo(casted);
          }
        }
  	  }
  
      return false;
  	}
focal_method.class_method_signature: Expr.equals(Object obj)
focal_method.full_signature: @Override public boolean equals(Object obj)
focal_method.identifier: equals
focal_method.invocations: equalsTo equals getChild getChild equals getLeft getLeft equals getRight getRight equalsTo
focal_method.modifiers: @Override public
focal_method.parameters: (Object obj)
focal_method.return: boolean
focal_method.signature: boolean equals(Object obj)