public Schema mergeTables(
            Map<FeatureOption, MergingStrategy> mergingStrategies,
            Schema sourceSchema,
            List<SqlNode> derivedColumns,
            List<SqlWatermark> derivedWatermarkSpecs,
            SqlTableConstraint derivedPrimaryKey) {

        SchemaBuilder schemaBuilder =
                new SchemaBuilder(
                        mergingStrategies,
                        sourceSchema,
                        (FlinkTypeFactory) validator.getTypeFactory(),
                        dataTypeFactory,
                        validator,
                        escapeExpression);
        schemaBuilder.appendDerivedColumns(mergingStrategies, derivedColumns);
        schemaBuilder.appendDerivedWatermarks(mergingStrategies, derivedWatermarkSpecs);
        schemaBuilder.appendDerivedPrimaryKey(derivedPrimaryKey);

        return schemaBuilder.build();
    }
@Test
    void mergeWithIncludeFailsOnDuplicateRegularColumnAndComputeColumn() {
        Schema sourceSchema = Schema.newBuilder().column("one", DataTypes.INT()).build();

        List<SqlNode> derivedColumns =
                Arrays.asList(
                        regularColumn("two", DataTypes.INT()),
                        computedColumn("three", plus("two", "3")),
                        regularColumn("three", DataTypes.INT()),
                        regularColumn("four", DataTypes.STRING()));

        assertThatThrownBy(
                        () ->
                                util.mergeTables(
                                        getDefaultMergingStrategies(),
                                        sourceSchema,
                                        derivedColumns,
                                        Collections.emptyList(),
                                        null))
                .isInstanceOf(ValidationException.class)
                .hasMessage(
                        "A column named 'three' already exists in the table. Duplicate columns "
                                + "exist in the compute column and regular column. ");
    }