@Test
  public void testSortedAndTransformedInsertIntoPartitionedTable() throws IOException {
    TableIdentifier identifier = TableIdentifier.of("default", "tbl_bucketed");
    Schema schema = new Schema(
        optional(1, "a", Types.IntegerType.get()),
        optional(2, "b", Types.StringType.get()),
        optional(3, "c", Types.IntegerType.get())
    );
    SortOrder order = SortOrder.builderFor(schema)
        .desc("c", NULLS_FIRST)
        .asc(truncate("b", 1))
        .build();
    PartitionSpec partitionSpec = PartitionSpec.builderFor(schema)
        .bucket("b", 2)
        .build();
    testTables.createTable(shell, identifier.name(), schema, order, partitionSpec, fileFormat, ImmutableList.of(),
        formatVersion, ImmutableMap.of());
    shell.executeStatement(String.format("INSERT INTO %s VALUES (1, 'EUR', 10), (5, 'HUF', 30), (2, 'EUR', 10), " +
        "(8, 'PLN', 20), (6, 'USD', null)", identifier.name()));
    List<Object[]> result = shell.executeStatement(String.format("SELECT * FROM %s", identifier.name()));
    List<Record> expected =
        TestHelper.RecordsBuilder.newInstance(schema).add(1, "EUR", 10).add(2, "EUR", 10).add(6, "USD", null)
            .add(5, "HUF", 30).add(8, "PLN", 20).build();
    HiveIcebergTestUtils.validateData(expected, HiveIcebergTestUtils.valueForRow(schema, result));
  }
Runs insert queries against Iceberg tables. These should cover the various insertion methods of Hive including:
inserting values, inserting from select subqueries, insert overwrite table, etc...
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergInserts.java