@VisibleForTesting
    public static Column inferWiderColumn(Column lColumn, Column rColumn) {
        if (!Objects.equals(lColumn.getName(), rColumn.getName())) {
            throw new IllegalStateException(
                    String.format(
                            "Unable to merge column %s and %s with different name.",
                            lColumn, rColumn));
        }
        if (!Objects.equals(lColumn.getComment(), rColumn.getComment())) {
            throw new IllegalStateException(
                    String.format(
                            "Unable to merge column %s and %s with different comments.",
                            lColumn, rColumn));
        }
        return lColumn.copy(inferWiderType(lColumn.getType(), rColumn.getType()));
    }
@Test
    public void testInferWiderColumn() {
        // Test normal merges
        Assertions.assertThat(
                        SchemaUtils.inferWiderColumn(
                                Column.physicalColumn("Column1", DataTypes.INT()),
                                Column.physicalColumn("Column1", DataTypes.BIGINT())))
                .isEqualTo(Column.physicalColumn("Column1", DataTypes.BIGINT()));

        Assertions.assertThat(
                        SchemaUtils.inferWiderColumn(
                                Column.physicalColumn("Column2", DataTypes.FLOAT()),
                                Column.physicalColumn("Column2", DataTypes.DOUBLE())))
                .isEqualTo(Column.physicalColumn("Column2", DataTypes.DOUBLE()));

        // Test merging columns with incompatible types
        Assertions.assertThatThrownBy(
                        () ->
                                SchemaUtils.inferWiderColumn(
                                        Column.physicalColumn("Column3", DataTypes.INT()),
                                        Column.physicalColumn("Column3", DataTypes.STRING())))
                .isExactlyInstanceOf(IllegalStateException.class);

        // Test merging with incompatible names
        Assertions.assertThatThrownBy(
                        () ->
                                SchemaUtils.inferWiderColumn(
                                        Column.physicalColumn("Column4", DataTypes.INT()),
                                        Column.physicalColumn("AnotherColumn4", DataTypes.INT())))
                .isExactlyInstanceOf(IllegalStateException.class);
    }