public static List<Record> valueForRow(Schema schema, List<Object[]> rows) {
    return rows.stream().map(row -> {
      Record record = GenericRecord.create(schema);
      for (int i = 0; i < row.length; ++i) {
        record.set(i, row[i]);
      }
      return record;
    }).collect(Collectors.toList());
  }
Converts a list of Object arrays to a list of Iceberg records.
@param schema The schema of the Iceberg record
@param rows The data of the records
@return The list of the converted records
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/HiveIcebergTestUtils.java