[CALCITE-1043] RelOptUtil should check SqlKind instead of operator instance (Minji Kim)
Close apache/calcite#262
diff --git a/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java b/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
index d9d2a63..0340b1b 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
@@ -1263,7 +1263,7 @@
List<RexNode> nonEquiList) {
if (condition instanceof RexCall) {
RexCall call = (RexCall) condition;
- if (call.getOperator() == SqlStdOperatorTable.AND) {
+ if (call.getOperator().getKind() == SqlKind.AND) {
for (RexNode operand : call.getOperands()) {
splitCorrelatedFilterCondition(
filter,
@@ -1275,7 +1275,7 @@
return;
}
- if (call.getOperator() == SqlStdOperatorTable.EQUALS) {
+ if (call.getOperator().getKind() == SqlKind.EQUALS) {
final List<RexNode> operands = call.getOperands();
RexNode op0 = operands.get(0);
RexNode op1 = operands.get(1);
@@ -1310,7 +1310,7 @@
boolean extractCorrelatedFieldAccess) {
if (condition instanceof RexCall) {
RexCall call = (RexCall) condition;
- if (call.getOperator() == SqlStdOperatorTable.AND) {
+ if (call.getOperator().getKind() == SqlKind.AND) {
for (RexNode operand : call.getOperands()) {
splitCorrelatedFilterCondition(
filter,
@@ -1323,7 +1323,7 @@
return;
}
- if (call.getOperator() == SqlStdOperatorTable.EQUALS) {
+ if (call.getOperator().getKind() == SqlKind.EQUALS) {
final List<RexNode> operands = call.getOperands();
RexNode op0 = operands.get(0);
RexNode op1 = operands.get(1);