@Override
  public void write(PreparedStatement statement) throws SQLException {
    if (columnValues == null) {
      throw new SQLException("No data available to be written");
    }
    ParameterMetaData parameterMetaData = statement.getParameterMetaData();
    for (int i = 0; i < columnValues.length; i++) {
      Object value = columnValues[i];
      if ((parameterMetaData.getParameterType(i + 1) == Types.CHAR) && value != null && value instanceof Boolean) {
        value = ((Boolean) value).booleanValue() ? "1" : "0";
      }
      statement.setObject(i + 1, value);
    }
  }
DBRecordWritable writes serialized row by row data to the underlying database.
jdbc-handler/src/main/java/org/apache/hive/storage/jdbc/DBRecordWritable.java