Interface UpdatePartitionSpec
- 
- All Superinterfaces:
- PendingUpdate<PartitionSpec>
 
 public interface UpdatePartitionSpec extends PendingUpdate<PartitionSpec> API for partition spec evolution.When committing, these changes will be applied to the current table metadata. Commit conflicts will not be resolved and will result in a CommitFailedException.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description UpdatePartitionSpecaddField(java.lang.String sourceName)Add a new partition field from a source column.UpdatePartitionSpecaddField(java.lang.String name, Term term)Add a new partition field from anexpression term, with the given partition field name.UpdatePartitionSpecaddField(Term term)Add a new partition field from anexpression term.UpdatePartitionSpeccaseSensitive(boolean isCaseSensitive)Set whether column resolution in the source schema should be case sensitive.UpdatePartitionSpecremoveField(java.lang.String name)Remove a partition field by name.UpdatePartitionSpecremoveField(Term term)Remove a partition field by its transformexpression term.UpdatePartitionSpecrenameField(java.lang.String name, java.lang.String newName)Rename a field in the partition spec.- 
Methods inherited from interface org.apache.iceberg.PendingUpdateapply, commit, updateEvent
 
- 
 
- 
- 
- 
Method Detail- 
caseSensitiveUpdatePartitionSpec caseSensitive(boolean isCaseSensitive) Set whether column resolution in the source schema should be case sensitive.- Parameters:
- isCaseSensitive- whether column resolution should be case sensitive
- Returns:
- this for method chaining
 
 - 
addFieldUpdatePartitionSpec addField(java.lang.String sourceName) Add a new partition field from a source column.The partition field will be created as an identity partition field for the given source column, with the same name as the source column. The source column is located using Schema.findField(String).- Parameters:
- sourceName- source column name in the table schema
- Returns:
- this for method chaining
- Throws:
- java.lang.IllegalArgumentException- If the an identity partition field for the source already exists, or if this change conflicts with other additions, removals, or renames.
 
 - 
addFieldUpdatePartitionSpec addField(Term term) Add a new partition field from anexpression term.The partition field will use the term's transform or the identity transform if the term is a reference. The term's reference is used to locate the source column using Schema.findField(String).The new partition field will be named for the source column and the transform. - Parameters:
- term- source column name in the table schema
- Returns:
- this for method chaining
- Throws:
- java.lang.IllegalArgumentException- If the a partition field for the transform and source already exists, or if this change conflicts with other additions, removals, or renames.
 
 - 
addFieldUpdatePartitionSpec addField(java.lang.String name, Term term) Add a new partition field from anexpression term, with the given partition field name.The partition field will use the term's transform or the identity transform if the term is a reference. The term's reference is used to locate the source column using Schema.findField(String).- Parameters:
- name- name for the partition field
- term- expression for the partition transform
- Returns:
- this for method chaining
- Throws:
- java.lang.IllegalArgumentException- If the a partition field for the transform and source already exists, if a partition field with the given name already exists, or if this change conflicts with other additions, removals, or renames.
 
 - 
removeFieldUpdatePartitionSpec removeField(java.lang.String name) Remove a partition field by name.- Parameters:
- name- name of the partition field to remove
- Returns:
- this for method chaining
- Throws:
- java.lang.IllegalArgumentException- If the a partition field with the given name does not exist, or if this change conflicts with other additions, removals, or renames.
 
 - 
removeFieldUpdatePartitionSpec removeField(Term term) Remove a partition field by its transformexpression term.The partition field with the same transform and source reference will be removed. If the term is a reference and does not have a transform, the identity transform is used. - Parameters:
- term- expression for the partition transform to remove
- Returns:
- this for method chaining
- Throws:
- java.lang.IllegalArgumentException- If the a partition field with the given transform and source does not exist, or if this change conflicts with other additions, removals, or renames.
 
 - 
renameFieldUpdatePartitionSpec renameField(java.lang.String name, java.lang.String newName) Rename a field in the partition spec.- Parameters:
- name- name of the partition field to rename
- newName- replacement name for the partition field
- Returns:
- this for method chaining
- Throws:
- java.lang.IllegalArgumentException- If name doesn't identify a column in the schema or if this change conflicts with other additions, removals, or renames.
 
 
- 
 
-