Repository: tajo Updated Branches: refs/heads/branch-0.8.0 c7e361676 -> ae6e2d14e
TAJO-529: Fix warnings in tajo-algebra. (jaehwa) Project: http://git-wip-us.apache.org/repos/asf/tajo/repo Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/ae6e2d14 Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/ae6e2d14 Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/ae6e2d14 Branch: refs/heads/branch-0.8.0 Commit: ae6e2d14ee20e65178ce54b4643aef1e4e35cdd4 Parents: c7e3616 Author: blrunner <[email protected]> Authored: Mon Mar 31 11:08:08 2014 +0900 Committer: blrunner <[email protected]> Committed: Mon Mar 31 11:08:08 2014 +0900 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ .../java/org/apache/tajo/algebra/CaseWhenPredicate.java | 2 +- .../src/main/java/org/apache/tajo/algebra/CreateTable.java | 9 ++++----- .../src/main/java/org/apache/tajo/algebra/Projection.java | 8 ++++++++ .../java/org/apache/tajo/algebra/TablePrimarySubQuery.java | 2 +- 5 files changed, 16 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tajo/blob/ae6e2d14/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index faa2f81..4c39d02 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -590,6 +590,8 @@ Release 0.8.0 - unreleased TASKS + TAJO-529: Fix warnings in tajo-algebra. (jaehwa) + TAJO-700: Update site, wikis, pom.xml and other resources to point to the new repository location. (jihoon) http://git-wip-us.apache.org/repos/asf/tajo/blob/ae6e2d14/tajo-algebra/src/main/java/org/apache/tajo/algebra/CaseWhenPredicate.java ---------------------------------------------------------------------- diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/CaseWhenPredicate.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/CaseWhenPredicate.java index 695a7f1..6af1fb2 100644 --- a/tajo-algebra/src/main/java/org/apache/tajo/algebra/CaseWhenPredicate.java +++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/CaseWhenPredicate.java @@ -101,7 +101,7 @@ public class CaseWhenPredicate extends Expr { public boolean equals(Object obj) { if (obj instanceof WhenExpr) { WhenExpr another = (WhenExpr) obj; - return condition.equals(another.condition) && result.equals(result); + return TUtil.checkEquals(condition, another.condition) && TUtil.checkEquals(result, another.result); } return false; http://git-wip-us.apache.org/repos/asf/tajo/blob/ae6e2d14/tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java ---------------------------------------------------------------------- diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java index 42dcc68..eb11ed0 100644 --- a/tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java +++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java @@ -323,8 +323,8 @@ public class CreateTable extends Expr { } public boolean equals(Object object) { - if (object instanceof HashPartition) { - HashPartition another = (HashPartition) object; + if (object instanceof ListPartition) { + ListPartition another = (ListPartition) object; return type == another.type && TUtil.checkEquals(columns, another.columns) && specifiers.equals(another.specifiers); } else { @@ -356,13 +356,12 @@ public class CreateTable extends Expr { } public boolean equals(Object object) { - if (object instanceof HashPartition) { + if (object instanceof ColumnPartition) { ColumnPartition another = (ColumnPartition) object; return type == another.type && TUtil.checkEquals(columns, another.columns) && TUtil.checkEquals(isOmitValues, another.isOmitValues); - } else { - return false; } + return false; } } http://git-wip-us.apache.org/repos/asf/tajo/blob/ae6e2d14/tajo-algebra/src/main/java/org/apache/tajo/algebra/Projection.java ---------------------------------------------------------------------- diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/Projection.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/Projection.java index ecf92dc..0e8ed46 100644 --- a/tajo-algebra/src/main/java/org/apache/tajo/algebra/Projection.java +++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/Projection.java @@ -65,4 +65,12 @@ public class Projection extends UnaryOperator implements Cloneable { public String toJson() { return JsonHelper.toJson(this); } + + public Projection clone() throws CloneNotSupportedException { + Projection projection = (Projection)super.clone(); + projection.distinct = distinct; + projection.targets = targets; + + return projection; + } } http://git-wip-us.apache.org/repos/asf/tajo/blob/ae6e2d14/tajo-algebra/src/main/java/org/apache/tajo/algebra/TablePrimarySubQuery.java ---------------------------------------------------------------------- diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/TablePrimarySubQuery.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/TablePrimarySubQuery.java index 2af90b6..953c080 100644 --- a/tajo-algebra/src/main/java/org/apache/tajo/algebra/TablePrimarySubQuery.java +++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/TablePrimarySubQuery.java @@ -53,7 +53,7 @@ public class TablePrimarySubQuery extends Relation { @Override boolean equalsTo(Expr expr) { TablePrimarySubQuery another = (TablePrimarySubQuery) expr; - return subquery.equals(subquery) && TUtil.checkEquals(columnNames, another.columnNames); + return subquery.equals(another.subquery) && TUtil.checkEquals(columnNames, another.columnNames); } public String toJson() {
