amoro-format-mixed/amoro-mixed-spark/v3.5/amoro-mixed-spark-3.5/src/main/java/org/apache/amoro/spark/io/TaskWriters.java [192:239]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public ChangeTaskWriter<InternalRow> newChangeWriter() {
    preconditions();
    String changeLocation;
    EncryptionManager encryptionManager;
    Schema schema;
    PrimaryKeySpec primaryKeySpec = null;
    Table icebergTable;

    if (table.isKeyedTable()) {
      KeyedTable keyedTable = table.asKeyedTable();
      changeLocation = keyedTable.changeLocation();
      encryptionManager = keyedTable.changeTable().encryption();
      schema = SchemaUtil.changeWriteSchema(keyedTable.changeTable().schema());
      primaryKeySpec = keyedTable.primaryKeySpec();
      icebergTable = keyedTable.baseTable();
    } else {
      throw new UnsupportedOperationException("Unkeyed table does not support change writer");
    }
    FileAppenderFactory<InternalRow> appenderFactory =
        InternalRowFileAppenderFactory.builderFor(
                icebergTable, schema, SparkSchemaUtil.convert(schema))
            .writeHive(isHiveTable)
            .build();

    OutputFileFactory outputFileFactory;
    outputFileFactory =
        new CommonOutputFileFactory(
            changeLocation,
            table.spec(),
            fileFormat,
            table.io(),
            encryptionManager,
            partitionId,
            taskId,
            transactionId);

    return new SparkChangeTaskWriter(
        fileFormat,
        appenderFactory,
        outputFileFactory,
        table.io(),
        fileSize,
        mask,
        schema,
        table.spec(),
        primaryKeySpec,
        orderedWriter);
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



amoro-format-mixed/amoro-mixed-spark/v3.2/amoro-mixed-spark-3.2/src/main/java/org/apache/amoro/spark/io/TaskWriters.java [192:239]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public ChangeTaskWriter<InternalRow> newChangeWriter() {
    preconditions();
    String changeLocation;
    EncryptionManager encryptionManager;
    Schema schema;
    PrimaryKeySpec primaryKeySpec = null;
    Table icebergTable;

    if (table.isKeyedTable()) {
      KeyedTable keyedTable = table.asKeyedTable();
      changeLocation = keyedTable.changeLocation();
      encryptionManager = keyedTable.changeTable().encryption();
      schema = SchemaUtil.changeWriteSchema(keyedTable.changeTable().schema());
      primaryKeySpec = keyedTable.primaryKeySpec();
      icebergTable = keyedTable.baseTable();
    } else {
      throw new UnsupportedOperationException("Unkeyed table does not support change writer");
    }
    FileAppenderFactory<InternalRow> appenderFactory =
        InternalRowFileAppenderFactory.builderFor(
                icebergTable, schema, SparkSchemaUtil.convert(schema))
            .writeHive(isHiveTable)
            .build();

    OutputFileFactory outputFileFactory;
    outputFileFactory =
        new CommonOutputFileFactory(
            changeLocation,
            table.spec(),
            fileFormat,
            table.io(),
            encryptionManager,
            partitionId,
            taskId,
            transactionId);

    return new SparkChangeTaskWriter(
        fileFormat,
        appenderFactory,
        outputFileFactory,
        table.io(),
        fileSize,
        mask,
        schema,
        table.spec(),
        primaryKeySpec,
        orderedWriter);
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



amoro-format-mixed/amoro-mixed-spark/v3.3/amoro-mixed-spark-3.3/src/main/java/org/apache/amoro/spark/io/TaskWriters.java [192:239]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public ChangeTaskWriter<InternalRow> newChangeWriter() {
    preconditions();
    String changeLocation;
    EncryptionManager encryptionManager;
    Schema schema;
    PrimaryKeySpec primaryKeySpec = null;
    Table icebergTable;

    if (table.isKeyedTable()) {
      KeyedTable keyedTable = table.asKeyedTable();
      changeLocation = keyedTable.changeLocation();
      encryptionManager = keyedTable.changeTable().encryption();
      schema = SchemaUtil.changeWriteSchema(keyedTable.changeTable().schema());
      primaryKeySpec = keyedTable.primaryKeySpec();
      icebergTable = keyedTable.baseTable();
    } else {
      throw new UnsupportedOperationException("Unkeyed table does not support change writer");
    }
    FileAppenderFactory<InternalRow> appenderFactory =
        InternalRowFileAppenderFactory.builderFor(
                icebergTable, schema, SparkSchemaUtil.convert(schema))
            .writeHive(isHiveTable)
            .build();

    OutputFileFactory outputFileFactory;
    outputFileFactory =
        new CommonOutputFileFactory(
            changeLocation,
            table.spec(),
            fileFormat,
            table.io(),
            encryptionManager,
            partitionId,
            taskId,
            transactionId);

    return new SparkChangeTaskWriter(
        fileFormat,
        appenderFactory,
        outputFileFactory,
        table.io(),
        fileSize,
        mask,
        schema,
        table.spec(),
        primaryKeySpec,
        orderedWriter);
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



