blob: 93c20ebb078e3ac3f0957f081e25839c17372a9f [file]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>UpdatePartitionSpec</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="declaration: package: org.apache.iceberg, interface: UpdatePartitionSpec">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<script type="text/javascript" src="../../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.iceberg</a></div>
<h1 title="Interface UpdatePartitionSpec" class="title">Interface UpdatePartitionSpec</h1>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Superinterfaces:</dt>
<dd><code><a href="PendingUpdate.html" title="interface in org.apache.iceberg">PendingUpdate</a>&lt;<a href="PartitionSpec.html" title="class in org.apache.iceberg">PartitionSpec</a>&gt;</code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">UpdatePartitionSpec</span><span class="extends-implements">
extends <a href="PendingUpdate.html" title="interface in org.apache.iceberg">PendingUpdate</a>&lt;<a href="PartitionSpec.html" title="class in org.apache.iceberg">PartitionSpec</a>&gt;</span></div>
<div class="block">API for partition spec evolution.
<p>When committing, these changes will be applied to the current table metadata. Commit conflicts
will not be resolved and will result in a <a href="exceptions/CommitFailedException.html" title="class in org.apache.iceberg.exceptions"><code>CommitFailedException</code></a>.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button><button id="method-summary-table-tab5" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab5', 3)" class="table-tab">Default Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#addField(java.lang.String)" class="member-name-link">addField</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;sourceName)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Add a new partition field from a source column.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#addField(java.lang.String,org.apache.iceberg.expressions.Term)" class="member-name-link">addField</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="expressions/Term.html" title="interface in org.apache.iceberg.expressions">Term</a>&nbsp;term)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Add a new partition field from an <a href="expressions/Expressions.html" title="class in org.apache.iceberg.expressions"><code>expression term</code></a>, with the given partition
field name.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#addField(org.apache.iceberg.expressions.Term)" class="member-name-link">addField</a><wbr>(<a href="expressions/Term.html" title="interface in org.apache.iceberg.expressions">Term</a>&nbsp;term)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Add a new partition field from an <a href="expressions/Expressions.html" title="class in org.apache.iceberg.expressions"><code>expression term</code></a>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default <a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#addNonDefaultSpec()" class="member-name-link">addNonDefaultSpec</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Sets that the new partition spec will be NOT set as the default partition spec for the table,
the default behavior is to do so.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#caseSensitive(boolean)" class="member-name-link">caseSensitive</a><wbr>(boolean&nbsp;isCaseSensitive)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Set whether column resolution in the source schema should be case sensitive.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#removeField(java.lang.String)" class="member-name-link">removeField</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Remove a partition field by name.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#removeField(org.apache.iceberg.expressions.Term)" class="member-name-link">removeField</a><wbr>(<a href="expressions/Term.html" title="interface in org.apache.iceberg.expressions">Term</a>&nbsp;term)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Remove a partition field by its transform <a href="expressions/Expressions.html" title="class in org.apache.iceberg.expressions"><code>expression term</code></a>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#renameField(java.lang.String,java.lang.String)" class="member-name-link">renameField</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;newName)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Rename a field in the partition spec.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.iceberg.PendingUpdate">Methods inherited from interface&nbsp;org.apache.iceberg.<a href="PendingUpdate.html" title="interface in org.apache.iceberg">PendingUpdate</a></h3>
<code><a href="PendingUpdate.html#apply()">apply</a>, <a href="PendingUpdate.html#commit()">commit</a>, <a href="PendingUpdate.html#updateEvent()">updateEvent</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="caseSensitive(boolean)">
<h3>caseSensitive</h3>
<div class="member-signature"><span class="return-type"><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></span>&nbsp;<span class="element-name">caseSensitive</span><wbr><span class="parameters">(boolean&nbsp;isCaseSensitive)</span></div>
<div class="block">Set whether column resolution in the source schema should be case sensitive.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>isCaseSensitive</code> - whether column resolution should be case sensitive</dd>
<dt>Returns:</dt>
<dd>this for method chaining</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addField(java.lang.String)">
<h3>addField</h3>
<div class="member-signature"><span class="return-type"><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></span>&nbsp;<span class="element-name">addField</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;sourceName)</span></div>
<div class="block">Add a new partition field from a source column.
<p>The partition field will be created as an identity partition field for the given source
column, with the same name as the source column.
<p>The source column is located using <a href="Schema.html#findField(java.lang.String)"><code>Schema.findField(String)</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>sourceName</code> - source column name in the table schema</dd>
<dt>Returns:</dt>
<dd>this for method chaining</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - If the an identity partition field for the source already
exists, or if this change conflicts with other additions, removals, or renames.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addField(org.apache.iceberg.expressions.Term)">
<h3>addField</h3>
<div class="member-signature"><span class="return-type"><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></span>&nbsp;<span class="element-name">addField</span><wbr><span class="parameters">(<a href="expressions/Term.html" title="interface in org.apache.iceberg.expressions">Term</a>&nbsp;term)</span></div>
<div class="block">Add a new partition field from an <a href="expressions/Expressions.html" title="class in org.apache.iceberg.expressions"><code>expression term</code></a>.
<p>The partition field will use the term's transform or the identity transform if the term is a
reference.
<p>The term's reference is used to locate the source column using <a href="Schema.html#findField(java.lang.String)"><code>Schema.findField(String)</code></a>.
<p>The new partition field will be named for the source column and the transform.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>term</code> - source column name in the table schema</dd>
<dt>Returns:</dt>
<dd>this for method chaining</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - If the a partition field for the transform and source already
exists, or if this change conflicts with other additions, removals, or renames.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addField(java.lang.String,org.apache.iceberg.expressions.Term)">
<h3>addField</h3>
<div class="member-signature"><span class="return-type"><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></span>&nbsp;<span class="element-name">addField</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="expressions/Term.html" title="interface in org.apache.iceberg.expressions">Term</a>&nbsp;term)</span></div>
<div class="block">Add a new partition field from an <a href="expressions/Expressions.html" title="class in org.apache.iceberg.expressions"><code>expression term</code></a>, with the given partition
field name.
<p>The partition field will use the term's transform or the identity transform if the term is a
reference.
<p>The term's reference is used to locate the source column using <a href="Schema.html#findField(java.lang.String)"><code>Schema.findField(String)</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - name for the partition field</dd>
<dd><code>term</code> - expression for the partition transform</dd>
<dt>Returns:</dt>
<dd>this for method chaining</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - 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.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="removeField(java.lang.String)">
<h3>removeField</h3>
<div class="member-signature"><span class="return-type"><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></span>&nbsp;<span class="element-name">removeField</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</span></div>
<div class="block">Remove a partition field by name.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - name of the partition field to remove</dd>
<dt>Returns:</dt>
<dd>this for method chaining</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - If the a partition field with the given name does not exist,
or if this change conflicts with other additions, removals, or renames.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="removeField(org.apache.iceberg.expressions.Term)">
<h3>removeField</h3>
<div class="member-signature"><span class="return-type"><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></span>&nbsp;<span class="element-name">removeField</span><wbr><span class="parameters">(<a href="expressions/Term.html" title="interface in org.apache.iceberg.expressions">Term</a>&nbsp;term)</span></div>
<div class="block">Remove a partition field by its transform <a href="expressions/Expressions.html" title="class in org.apache.iceberg.expressions"><code>expression term</code></a>.
<p>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.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>term</code> - expression for the partition transform to remove</dd>
<dt>Returns:</dt>
<dd>this for method chaining</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - 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.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="renameField(java.lang.String,java.lang.String)">
<h3>renameField</h3>
<div class="member-signature"><span class="return-type"><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></span>&nbsp;<span class="element-name">renameField</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;newName)</span></div>
<div class="block">Rename a field in the partition spec.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - name of the partition field to rename</dd>
<dd><code>newName</code> - replacement name for the partition field</dd>
<dt>Returns:</dt>
<dd>this for method chaining</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - If name doesn't identify a column in the schema or if this
change conflicts with other additions, removals, or renames.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addNonDefaultSpec()">
<h3>addNonDefaultSpec</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type"><a href="UpdatePartitionSpec.html" title="interface in org.apache.iceberg">UpdatePartitionSpec</a></span>&nbsp;<span class="element-name">addNonDefaultSpec</span>()</div>
<div class="block">Sets that the new partition spec will be NOT set as the default partition spec for the table,
the default behavior is to do so.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>this for method chaining</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>