@DisplayName("TestSQL: INSERT OVERWRITE hidden partition optimize write")
  @ParameterizedTest()
  @MethodSource
  public void testHiddenPartitions(
      TableFormat format, PrimaryKeySpec keySpec, PartitionSpec ptSpec) {
    spark().conf().set(OVERWRITE_MODE_KEY, DYNAMIC);
    spark().conf().set(SparkSQLProperties.OPTIMIZE_WRITE_ENABLED, "true");

    this.table =
        createTarget(
            hiddenPartitionSchema,
            builder -> builder.withPrimaryKeySpec(keySpec).withPartitionSpec(ptSpec));
    createViewSource(hiddenPartitionSchema, hiddenPartitionSource);
    this.initFiles = Lists.newArrayList();

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

    table.refresh();
    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.2/amoro-mixed-spark-3.2/src/test/java/org/apache/amoro/spark/test/suites/sql/TestInsertOverwriteSQL.java