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

The following examples show how to use org.apache.calcite.sql.SqlKind#GREATER_THAN . 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 File: RexImplicationChecker.java    From Bats with 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 File: RexImplicationChecker.java    From Bats with 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 File: RexImplicationChecker.java    From calcite with 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 File: RexImplicationChecker.java    From calcite with 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 5
Source File: ParquetFilterCondition.java    From dremio-oss with Apache License 2.0 4 votes vote down vote up
public boolean isOpen(){
  return kind == SqlKind.GREATER_THAN || kind == SqlKind.LESS_THAN;
}