public interface MutableRowSchema
| Modifier and Type | Method and Description |
|---|---|
Schema.Field |
getField(String columnName)
Get the
Schema.Field of a column by its name. |
void |
renameField(String originalName,
String newName)
Rename a field.
|
void |
setField(Schema.Field field)
Set the
Schema.Field of a column by its name in the Schema.Field. |
Schema |
toSchema() |
Schema.Field getField(String columnName) throws NotFoundException
Schema.Field of a column by its name.
if the column was once renamed , the new name should be used to get the Schema.Field.columnName - the name of the column. Once renamed , new name should be used to get the Schema.Field.Schema.Field of the corresponding column.NotFoundException - if the given column name doesn't exist.void setField(Schema.Field field)
Schema.Field of a column by its name in the Schema.Field. Once renamed, new name should be
used to set the Schema.Field again. If the given name doesn't exist , a new field will be added.field - the new Schema.Field of the column.IllegalArgumentException - if the specified field is null or the specified field doesn't have a name
associated with it.void renameField(String originalName, String newName)
originalName - the original name of the field to be renamed.newName - the new name of the field.IllegalArgumentException - if the original field name doesn't exist or the new field name already exists.Schema toSchema()
Copyright © 2022 CDAP Licensed under the Apache License, Version 2.0.