@Test
  public void testMigrateHiveTableWithPrimitiveTypeColumnsToIceberg() throws TException, InterruptedException {
    shell.setHiveSessionValue(InputFormatConfig.SCHEMA_AUTO_CONVERSION, "true");
    TableIdentifier identifier = TableIdentifier.of("default", "tbl_alltypes");
    shell.executeStatement(String.format("CREATE EXTERNAL TABLE %s (" +
        "a INT, " +
        "decimal_col DECIMAL(30, 3), " +
        "tinyint_col TINYINT, " +
        "boolean_col BOOLEAN, " +
        "float_col FLOAT, " +
        "bigint_col BIGINT, " +
        "double_col DOUBLE, " +
        "string_col STRING, " +
        "int_col INT, " +
        "smallint_col SMALLINT) " +
        "STORED AS %s %s %s",
        identifier.name(), fileFormat.name(), testTables.locationForCreateTableSQL(identifier),
        testTables.propertiesForCreateTableSQL(ImmutableMap.of())));

    shell.executeStatement(String.format("INSERT INTO TABLE %s VALUES(" +
        "1, " +
        "13.234, " +
        "8, " +
        "false, " +
        "0.7896, " +
        "543643275, " +
        "5462435243, " +
        "'wfewjifwejfoewfnvewokfow', " +
        "43221, " +
        "129 " +
        ")", identifier.name()));

    validateMigration(identifier.name());
  }
Tests table migration from native Hive tables to Iceberg backed tables (with the same underlying fileformat).
Migration on the original tables is done by setting HiveIcebergStorageHandler on them, contents later should be
verified by a select query.
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergMigration.java