public class InternalSchemaChangeApplier extends Object
| Constructor and Description |
|---|
InternalSchemaChangeApplier(InternalSchema latestSchema) |
| Modifier and Type | Method and Description |
|---|---|
InternalSchema |
applyAddChange(String colName,
Type colType,
String doc,
String position,
TableChange.ColumnPositionChange.ColumnPositionType positionType)
Add columns to table.
|
InternalSchema |
applyColumnCommentChange(String colName,
String doc)
Update col comment for hudi table.
|
InternalSchema |
applyColumnNullabilityChange(String colName,
boolean nullable)
Update col nullability for hudi table.
|
InternalSchema |
applyColumnTypeChange(String colName,
Type newType)
Update col type for hudi table.
|
InternalSchema |
applyDeleteChange(String... colNames)
Delete columns to table.
|
InternalSchema |
applyRenameChange(String colName,
String newName)
Rename col name for hudi table.
|
InternalSchema |
applyReOrderColPositionChange(String colName,
String referColName,
TableChange.ColumnPositionChange.ColumnPositionType positionType)
Reorder the position of col.
|
public InternalSchemaChangeApplier(InternalSchema latestSchema)
public InternalSchema applyAddChange(String colName, Type colType, String doc, String position, TableChange.ColumnPositionChange.ColumnPositionType positionType)
colName - col name to be added. if we want to add col to a nested filed, the fullName should be specifycolType - col type to be added.doc - col doc to be added.position - col position to be addedpositionType - col position change type. now support three change types: first/after/beforepublic InternalSchema applyDeleteChange(String... colNames)
colNames - col name to be deleted. if we want to delete col from a nested filed, the fullName should be specifypublic InternalSchema applyRenameChange(String colName, String newName)
colName - col name to be renamed. if we want to rename col from a nested filed, the fullName should be specifynewName - new name for current col. no need to specify fullName.public InternalSchema applyColumnNullabilityChange(String colName, boolean nullable)
colName - col name to be changed. if we want to change col from a nested filed, the fullName should be specifynullable - .public InternalSchema applyColumnTypeChange(String colName, Type newType)
colName - col name to be changed. if we want to change col from a nested filed, the fullName should be specifynewType - .public InternalSchema applyColumnCommentChange(String colName, String doc)
colName - col name to be changed. if we want to change col from a nested filed, the fullName should be specifydoc - .public InternalSchema applyReOrderColPositionChange(String colName, String referColName, TableChange.ColumnPositionChange.ColumnPositionType positionType)
colName - column which need to be reordered. if we want to change col from a nested filed, the fullName should be specify.referColName - reference position.positionType - col position change type. now support three change types: first/after/beforeCopyright © 2024 The Apache Software Foundation. All rights reserved.