class BeamSqlCaseExpression extends BeamSqlExpression {

  @Override
  public boolean accept() {
    // `when`-`then` pair + `else`
    if (operands.size() % 2 != 1) {
      return false;
    }

    for (int i = 0; i < operands.size() - 1; i += 2) {
      if (opType(i) != SqlTypeName.BOOLEAN) {
        return false;
      } else if (opType(i + 1) != outputType) {
        return false;
      }
    }

    return true;
  }

  public  BeamSqlCaseExpression(List<BeamSqlExpression> operands);

}