@DisplayName("TestSQL: INSERT INTO table without upsert")
  @ParameterizedTest
  @MethodSource
  public void testNoUpsert(
      TableFormat format,
      Schema schema,
      PrimaryKeySpec keySpec,
      PartitionSpec ptSpec,
      FileFormat fileFormat) {
    MixedTable table =
        createTarget(
            schema,
            tableBuilder ->
                tableBuilder
                    .withPrimaryKeySpec(keySpec)
                    .withProperty(TableProperties.UPSERT_ENABLED, "false")
                    .withProperty(TableProperties.CHANGE_FILE_FORMAT, fileFormat.name())
                    .withProperty(TableProperties.BASE_FILE_FORMAT, fileFormat.name())
                    .withPartitionSpec(ptSpec));

    createViewSource(schema, source);

    TestTableUtil.writeToBase(table, base);
    sql("INSERT INTO " + target() + " SELECT * FROM " + source());
    table.refresh();

    // mor result
    List<Record> results = TestTableUtil.tableRecords(table);
    List<Record> expects = Lists.newArrayList();
    expects.addAll(base);
    expects.addAll(source);

    DataComparator.build(expects, results).ignoreOrder(comparator).assertRecordsEqual();
  }
test 1. upsert not enabled test 2. upsert enabled test 3. upsert source duplicate check test 4.
upsert optimize write
amoro-format-mixed/amoro-mixed-spark/v3.5/amoro-mixed-spark-3.5/src/test/java/org/apache/amoro/spark/test/suites/sql/TestInsertIntoSQL.java