@DisplayName("TestSQL: INSERT OVERWRITE dynamic mode")
  @ParameterizedTest()
  @MethodSource
  public void testDynamic(TableFormat format, PrimaryKeySpec keySpec) {
    spark().conf().set(OVERWRITE_MODE_KEY, DYNAMIC);

    initTargetTable(keySpec, PT_SPEC);

    sql("INSERT OVERWRITE " + target() + " SELECT * FROM " + source());

    table.refresh();
    List<Record> expects =
        ExpectResultUtil.dynamicOverwriteResult(target, source, r -> r.getField("pt"));
    List<Record> actual = TestTableUtil.tableRecords(table);
    DataComparator.build(expects, actual).ignoreOrder("id").assertRecordsEqual();

    assertFileLayout(format);
  }
1. dynamic insert overwrite 2. static insert overwrite 3. for un-partitioned table 3. duplicate
check for insert overwrite 4. optimize write is work for insert overwrite
amoro-format-mixed/amoro-mixed-spark/v3.3/amoro-mixed-spark-3.3/src/test/java/org/apache/amoro/spark/test/suites/sql/TestInsertOverwriteSQL.java