@Test
  public void testRowIterator() throws Exception {
    assumeTrue("Tests a format-independent feature", isVectorized && FileFormat.ORC.equals(fileFormat));

    // Create a table with sample data with all supported types, those unsupported for vectorization are commented out
    Schema allSchema = new Schema(
        optional(1, "binary_col", Types.BinaryType.get()),
        optional(2, "boolean_col", Types.BooleanType.get()),
        optional(3, "date_col", Types.DateType.get()),
        optional(4, "decimal_col", Types.DecimalType.of(6, 4)),
        optional(5, "double_col", Types.DoubleType.get()),
        optional(6, "fixed_col", Types.FixedType.ofLength(4)),
        optional(7, "float_col", Types.FloatType.get()),
        optional(8, "int_col", Types.IntegerType.get()),
        optional(9, "long_col", Types.LongType.get()),
        optional(10, "string_col", Types.StringType.get()),
//        optional(11, "uuid_col", Types.UUIDType.get()),
        optional(12, "timestamp_col", Types.TimestampType.withoutZone())
//        optional(13, "timestamp_with_tz_col", Types.TimestampType.withZone()),
//        optional(14, "time_col", Types.TimeType.get())
    );

    // Generate 10 records for all column types into our test table
    List<Record> records = TestHelper.generateRandomRecords(allSchema, 10, 0L);
    Table table = testTables.createTable(shell, "temptable", allSchema, fileFormat, records);

    // Identify data file location - expected to be 1 file exactly
    Path dataFilePath = new Path(Lists.newArrayList(Lists.newArrayList(table.newScan().planTasks().iterator()).get(0)
        .files().iterator()).get(0).file().path().toString());

    // Generate a mock vectorized read job
    JobConf jobConf = prepareMockJob(allSchema, dataFilePath);

    // Simulates HiveVectorizedReader creating an ORC record reader (implementation inside Hive QL code)
    VectorizedOrcInputFormat inputFormat = new VectorizedOrcInputFormat();
    RecordReader<NullWritable, VectorizedRowBatch> internalVectorizedRecordReader =
        inputFormat.getRecordReader(new FileSplit(dataFilePath, 0L, Long.MAX_VALUE, new String[]{}), jobConf,
            new MockReporter());
    HiveBatchIterator hiveBatchIterator = new HiveBatchIterator(
        internalVectorizedRecordReader, jobConf, null, null, null);

    // Expected to be one batch exactly
    HiveBatchContext hiveBatchContext = hiveBatchIterator.next();
    CloseableIterator<HiveRow> hiveRowIterator = hiveBatchContext.rowIterator();

    // Iterator for the expected records
    Iterator<Record> genericRowIterator = records.iterator();

    // Compare record data provided by Hive with those provided by GenericRecord implementation of Iceberg
    while (hiveRowIterator.hasNext() && genericRowIterator.hasNext()) {
      HiveRow hiveRow = hiveRowIterator.next();
      Record hiveRecord = HiveValueConverter.convert(allSchema, hiveRow);
      Record genericRecord = genericRowIterator.next();

      // Will do a deep comparison on values
      Assert.assertEquals(genericRecord, hiveRecord);
    }

    // The two iterators both should be at the end by now
    Assert.assertEquals(genericRowIterator.hasNext(), hiveRowIterator.hasNext());
  }
Tests the row iterator implementation (HiveRow, HiveBatchContext.RowIterator) along with HiveValueConverter by
reading in values from all supported types via VRBs, and iterating on its records 1-by-1 while comparing with the
expected Iceberg record instances.
@throws Exception any test failure
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/vector/TestHiveIcebergVectorization.java