class PhoenixDBFlavor extends DefaultDBFlavor {
  public PhoenixDBFlavor() {
    super(DBName.PHOENIX);
  }

  @Override
  public String createInsertStatement(StatementType insertType, String key) {
    // Phoenix uses UPSERT syntax
    StringBuilder insert = new StringBuilder("UPSERT INTO ");
    insert.append(insertType.getTableName());
    insert.append(" (" + JdbcDBClient.PRIMARY_KEY + "," + insertType.getFieldString() + ")");
    insert.append(" VALUES(?");
    for (int i = 0; i < insertType.getNumFields(); i++) {
      insert.append(",?");
    }
    insert.append(")");
    return insert.toString();
  }

  @Override
  public String createUpdateStatement(StatementType updateType, String key) {<FILL_FUNCTION_BODY>}
}

    // Phoenix doesn't have UPDATE semantics, just re-use UPSERT VALUES on the specific columns
    String[] fieldKeys = updateType.getFieldString().split(",");
    StringBuilder update = new StringBuilder("UPSERT INTO ");
    update.append(updateType.getTableName());
    update.append(" (");
    // Each column to update
    for (int i = 0; i < fieldKeys.length; i++) {
      update.append(fieldKeys[i]).append(",");
    }
    // And then set the primary key column
    update.append(JdbcDBClient.PRIMARY_KEY).append(") VALUES(");
    // Add an unbound param for each column to update
    for (int i = 0; i < fieldKeys.length; i++) {
      update.append("?, ");
    }
    // Then the primary key column's value
    update.append("?)");
    return update.toString();
  
<methods>public void <init>() ,public void <init>(site.ycsb.db.flavors.DBFlavor.DBName) ,public java.lang.String createDeleteStatement(site.ycsb.db.StatementType, java.lang.String) ,public java.lang.String createInsertStatement(site.ycsb.db.StatementType, java.lang.String) ,public java.lang.String createReadStatement(site.ycsb.db.StatementType, java.lang.String) ,public java.lang.String createScanStatement(site.ycsb.db.StatementType, java.lang.String, boolean, boolean) ,public java.lang.String createUpdateStatement(site.ycsb.db.StatementType, java.lang.String) <variables>