Skip to content

Commit

Permalink
rebase and format
Browse files Browse the repository at this point in the history
  • Loading branch information
herefree committed Oct 9, 2024
1 parent 73819aa commit 10bebab
Showing 1 changed file with 9 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.apache.paimon.table.source.ReadBuilder;
import org.apache.paimon.utils.FileStorePathFactory;
import org.apache.paimon.utils.InternalRowPartitionComputer;
import org.apache.paimon.utils.Preconditions;
import org.apache.paimon.utils.StringUtils;

import org.apache.flink.table.api.TableSchema;
Expand Down Expand Up @@ -458,12 +459,8 @@ private List<SchemaChange> toSchemaChange(
schemaChanges.add(
SchemaChange.addColumn(
add.getColumn().getName(),
<<<<<<< HEAD
LogicalTypeConversion.toDataType(
add.getColumn().getDataType().getLogicalType()),
=======
toDataType(add.getColumn().getDataType().getLogicalType()),
>>>>>>> b5f198307 (format)
comment,
move));
}
Expand Down Expand Up @@ -512,12 +509,8 @@ >>>>>>> b5f198307 (format)
}
schemaChanges.add(
SchemaChange.updateColumnType(
<<<<<<< HEAD
modify.getOldColumn().getName(),
LogicalTypeConversion.toDataType(newColumnType)));
=======
modify.getOldColumn().getName(), toDataType(newColumnType)));
>>>>>>> b5f198307 (format)
}
return schemaChanges;
} else if (change instanceof ModifyColumnPosition) {
Expand Down Expand Up @@ -567,9 +560,9 @@ >>>>>>> b5f198307 (format)
} else if (change instanceof TableChange.ModifyColumn) {
// let non-physical column handle by option
if (oldTableNonPhysicalColumnIndex.containsKey(
((TableChange.ModifyColumn) change).getOldColumn().getName())
((TableChange.ModifyColumn) change).getOldColumn().getName())
&& !(((TableChange.ModifyColumn) change).getNewColumn()
instanceof Column.PhysicalColumn)) {
instanceof Column.PhysicalColumn)) {
return schemaChanges;
} else {
throw new UnsupportedOperationException(
Expand Down Expand Up @@ -723,8 +716,8 @@ public void alterTable(
try {
catalog.alterTable(toIdentifier(tablePath), changes, ignoreIfNotExists);
} catch (Catalog.TableNotExistException
| Catalog.ColumnAlreadyExistException
| Catalog.ColumnNotExistException e) {
| Catalog.ColumnAlreadyExistException
| Catalog.ColumnNotExistException e) {
throw new CatalogException(e);
}
}
Expand Down Expand Up @@ -755,12 +748,8 @@ private String getWatermarkExprDataTypeKey(String watermarkPrefix) {
return compoundKey(watermarkPrefix, WATERMARK_STRATEGY_DATA_TYPE);
}

<<<<<<< HEAD
private void setWatermarkOptions(
org.apache.flink.table.catalog.WatermarkSpec wms, List<SchemaChange> schemaChanges) {
=======
private void setWatermarkOptions(WatermarkSpec wms, List<SchemaChange> schemaChanges) {
>>>>>>> b5f198307 (format)
String watermarkPrefix = getWatermarkKeyPrefix();
schemaChanges.add(
SchemaChange.setOption(
Expand Down Expand Up @@ -798,11 +787,11 @@ private static void validateAlterTable(CatalogBaseTable ct1, CatalogBaseTable ct
if (ts1.getPrimaryKey().isPresent() && ts2.getPrimaryKey().isPresent()) {
pkEquality =
Objects.equals(
ts1.getPrimaryKey().get().getType(),
ts2.getPrimaryKey().get().getType())
ts1.getPrimaryKey().get().getType(),
ts2.getPrimaryKey().get().getType())
&& Objects.equals(
ts1.getPrimaryKey().get().getColumns(),
ts2.getPrimaryKey().get().getColumns());
ts1.getPrimaryKey().get().getColumns(),
ts2.getPrimaryKey().get().getColumns());
} else if (!ts1.getPrimaryKey().isPresent() && !ts2.getPrimaryKey().isPresent()) {
pkEquality = true;
}
Expand Down

0 comments on commit 10bebab

Please sign in to comment.