Java Code Examples for org.apache.calcite.sql.SqlKind#GREATER_THAN_OR_EQUAL

The following examples show how to use org.apache.calcite.sql.SqlKind#GREATER_THAN_OR_EQUAL . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Bats   File: RexImplicationChecker.java    License: Apache License 2.0 6 votes vote down vote up
private boolean isEquivalentOp(SqlKind fKind, SqlKind sKind) {
  switch (sKind) {
  case GREATER_THAN:
  case GREATER_THAN_OR_EQUAL:
    if (!(fKind == SqlKind.GREATER_THAN)
        && !(fKind == SqlKind.GREATER_THAN_OR_EQUAL)) {
      return false;
    }
    break;
  case LESS_THAN:
  case LESS_THAN_OR_EQUAL:
    if (!(fKind == SqlKind.LESS_THAN)
        && !(fKind == SqlKind.LESS_THAN_OR_EQUAL)) {
      return false;
    }
    break;
  default:
    return false;
  }

  return true;
}
 
Example 2
Source Project: Bats   File: RexImplicationChecker.java    License: Apache License 2.0 6 votes vote down vote up
private boolean isOppositeOp(SqlKind fKind, SqlKind sKind) {
  switch (sKind) {
  case GREATER_THAN:
  case GREATER_THAN_OR_EQUAL:
    if (!(fKind == SqlKind.LESS_THAN)
        && !(fKind == SqlKind.LESS_THAN_OR_EQUAL)) {
      return false;
    }
    break;
  case LESS_THAN:
  case LESS_THAN_OR_EQUAL:
    if (!(fKind == SqlKind.GREATER_THAN)
        && !(fKind == SqlKind.GREATER_THAN_OR_EQUAL)) {
      return false;
    }
    break;
  default:
    return false;
  }
  return true;
}
 
Example 3
Source Project: calcite   File: RexImplicationChecker.java    License: Apache License 2.0 6 votes vote down vote up
private boolean isEquivalentOp(SqlKind fKind, SqlKind sKind) {
  switch (sKind) {
  case GREATER_THAN:
  case GREATER_THAN_OR_EQUAL:
    if (!(fKind == SqlKind.GREATER_THAN)
        && !(fKind == SqlKind.GREATER_THAN_OR_EQUAL)) {
      return false;
    }
    break;
  case LESS_THAN:
  case LESS_THAN_OR_EQUAL:
    if (!(fKind == SqlKind.LESS_THAN)
        && !(fKind == SqlKind.LESS_THAN_OR_EQUAL)) {
      return false;
    }
    break;
  default:
    return false;
  }

  return true;
}
 
Example 4
Source Project: calcite   File: RexImplicationChecker.java    License: Apache License 2.0 6 votes vote down vote up
private boolean isOppositeOp(SqlKind fKind, SqlKind sKind) {
  switch (sKind) {
  case GREATER_THAN:
  case GREATER_THAN_OR_EQUAL:
    if (!(fKind == SqlKind.LESS_THAN)
        && !(fKind == SqlKind.LESS_THAN_OR_EQUAL)) {
      return false;
    }
    break;
  case LESS_THAN:
  case LESS_THAN_OR_EQUAL:
    if (!(fKind == SqlKind.GREATER_THAN)
        && !(fKind == SqlKind.GREATER_THAN_OR_EQUAL)) {
      return false;
    }
    break;
  default:
    return false;
  }
  return true;
}