Repository: phoenix Updated Branches: refs/heads/calcite 468d17ac8 -> a0aca7f51
http://git-wip-us.apache.org/repos/asf/phoenix/blob/a0aca7f5/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerAggregateRule.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerAggregateRule.java b/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerAggregateRule.java index 969a433..27747b1 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerAggregateRule.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerAggregateRule.java @@ -2,12 +2,12 @@ package org.apache.phoenix.calcite.rules; import org.apache.calcite.plan.RelOptRule; import org.apache.calcite.plan.RelOptRuleCall; -import org.apache.phoenix.calcite.PhoenixClientAggregate; -import org.apache.phoenix.calcite.PhoenixRel; -import org.apache.phoenix.calcite.PhoenixServerAggregate; -import org.apache.phoenix.calcite.PhoenixServerJoin; -import org.apache.phoenix.calcite.PhoenixServerProject; -import org.apache.phoenix.calcite.PhoenixTableScan; +import org.apache.phoenix.calcite.rel.PhoenixClientAggregate; +import org.apache.phoenix.calcite.rel.PhoenixRel; +import org.apache.phoenix.calcite.rel.PhoenixServerAggregate; +import org.apache.phoenix.calcite.rel.PhoenixServerJoin; +import org.apache.phoenix.calcite.rel.PhoenixServerProject; +import org.apache.phoenix.calcite.rel.PhoenixTableScan; public class PhoenixServerAggregateRule extends RelOptRule { http://git-wip-us.apache.org/repos/asf/phoenix/blob/a0aca7f5/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerJoinRule.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerJoinRule.java b/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerJoinRule.java index 3c15ea9..2f30dad 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerJoinRule.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerJoinRule.java @@ -4,23 +4,23 @@ import org.apache.calcite.plan.RelOptRule; import org.apache.calcite.plan.RelOptRuleCall; import org.apache.calcite.plan.RelOptRuleOperand; import org.apache.calcite.rel.core.JoinRelType; -import org.apache.phoenix.calcite.PhoenixClientJoin; -import org.apache.phoenix.calcite.PhoenixRel; -import org.apache.phoenix.calcite.PhoenixServerJoin; -import org.apache.phoenix.calcite.PhoenixServerProject; -import org.apache.phoenix.calcite.PhoenixTableScan; +import org.apache.phoenix.calcite.rel.PhoenixJoin; +import org.apache.phoenix.calcite.rel.PhoenixRel; +import org.apache.phoenix.calcite.rel.PhoenixServerJoin; +import org.apache.phoenix.calcite.rel.PhoenixServerProject; +import org.apache.phoenix.calcite.rel.PhoenixTableScan; import com.google.common.base.Predicate; public class PhoenixServerJoinRule extends RelOptRule { /** Predicate that returns true if a join type is not right or full. */ - private static final Predicate<PhoenixClientJoin> NO_RIGHT_OR_FULL = - new Predicate<PhoenixClientJoin>() { + private static final Predicate<PhoenixJoin> NO_RIGHT_OR_FULL = + new Predicate<PhoenixJoin>() { @Override - public boolean apply(PhoenixClientJoin phoenixClientJoin) { - return phoenixClientJoin.getJoinType() != JoinRelType.RIGHT - && phoenixClientJoin.getJoinType() != JoinRelType.FULL; + public boolean apply(PhoenixJoin phoenixJoin) { + return phoenixJoin.getJoinType() != JoinRelType.RIGHT + && phoenixJoin.getJoinType() != JoinRelType.FULL; } }; @@ -35,7 +35,7 @@ public class PhoenixServerJoinRule extends RelOptRule { public PhoenixServerJoinRule(String description, RelOptRuleOperand left) { super( - operand(PhoenixClientJoin.class, null, NO_RIGHT_OR_FULL, + operand(PhoenixJoin.class, null, NO_RIGHT_OR_FULL, left, operand(PhoenixRel.class, any())), description); @@ -43,7 +43,7 @@ public class PhoenixServerJoinRule extends RelOptRule { @Override public void onMatch(RelOptRuleCall call) { - PhoenixClientJoin join = call.rel(0); + PhoenixJoin join = call.rel(0); PhoenixRel left = call.rel(1); PhoenixRel right = call.rel(call.getRelList().size() - 1); call.transformTo(new PhoenixServerJoin(join.getCluster(), http://git-wip-us.apache.org/repos/asf/phoenix/blob/a0aca7f5/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerProjectRule.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerProjectRule.java b/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerProjectRule.java index 05bd332..5fd3e0f 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerProjectRule.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerProjectRule.java @@ -2,11 +2,11 @@ package org.apache.phoenix.calcite.rules; import org.apache.calcite.plan.RelOptRule; import org.apache.calcite.plan.RelOptRuleCall; -import org.apache.phoenix.calcite.PhoenixClientProject; -import org.apache.phoenix.calcite.PhoenixRel; -import org.apache.phoenix.calcite.PhoenixServerJoin; -import org.apache.phoenix.calcite.PhoenixServerProject; -import org.apache.phoenix.calcite.PhoenixTableScan; +import org.apache.phoenix.calcite.rel.PhoenixClientProject; +import org.apache.phoenix.calcite.rel.PhoenixRel; +import org.apache.phoenix.calcite.rel.PhoenixServerJoin; +import org.apache.phoenix.calcite.rel.PhoenixServerProject; +import org.apache.phoenix.calcite.rel.PhoenixTableScan; public class PhoenixServerProjectRule extends RelOptRule { http://git-wip-us.apache.org/repos/asf/phoenix/blob/a0aca7f5/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerSortRule.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerSortRule.java b/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerSortRule.java index 0bd517f..19354be 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerSortRule.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixServerSortRule.java @@ -2,12 +2,12 @@ package org.apache.phoenix.calcite.rules; import org.apache.calcite.plan.RelOptRule; import org.apache.calcite.plan.RelOptRuleCall; -import org.apache.phoenix.calcite.PhoenixClientSort; -import org.apache.phoenix.calcite.PhoenixRel; -import org.apache.phoenix.calcite.PhoenixServerJoin; -import org.apache.phoenix.calcite.PhoenixServerProject; -import org.apache.phoenix.calcite.PhoenixServerSort; -import org.apache.phoenix.calcite.PhoenixTableScan; +import org.apache.phoenix.calcite.rel.PhoenixClientSort; +import org.apache.phoenix.calcite.rel.PhoenixRel; +import org.apache.phoenix.calcite.rel.PhoenixServerJoin; +import org.apache.phoenix.calcite.rel.PhoenixServerProject; +import org.apache.phoenix.calcite.rel.PhoenixServerSort; +import org.apache.phoenix.calcite.rel.PhoenixTableScan; public class PhoenixServerSortRule extends RelOptRule { http://git-wip-us.apache.org/repos/asf/phoenix/blob/a0aca7f5/phoenix-core/src/test/java/org/apache/phoenix/calcite/ToExpressionTest.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/test/java/org/apache/phoenix/calcite/ToExpressionTest.java b/phoenix-core/src/test/java/org/apache/phoenix/calcite/ToExpressionTest.java index ceaef50..067d932 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/calcite/ToExpressionTest.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/calcite/ToExpressionTest.java @@ -13,7 +13,8 @@ import org.apache.calcite.rex.RexInputRef; import org.apache.calcite.rex.RexNode; import org.apache.calcite.sql.fun.SqlStdOperatorTable; import org.apache.calcite.sql.type.SqlTypeName; -import org.apache.phoenix.calcite.PhoenixRel.Implementor; +import org.apache.phoenix.calcite.rel.PhoenixRelImplementorImpl; +import org.apache.phoenix.calcite.rel.PhoenixRel.Implementor; import org.apache.phoenix.compile.ColumnResolver; import org.apache.phoenix.compile.FromCompiler; import org.apache.phoenix.compile.StatementContext;
